October 9, 2003 at 4:14 am
Hello,
I am a novice in sql. i have problems understanding the precedence of operators in a query and hence what the query does. can anyone suggest a method.
October 9, 2003 at 4:38 am
Hi,
quote:
I am a novice in sql. i have problems understanding the precedence of operators in a query and hence what the query does. can anyone suggest a method.
what about posting the query first?
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 10, 2003 at 12:31 am
nice one,
i was talking in general
and the precedences of select, from, where, etc.
tried to search on precedences only to find that * > + etc.
October 10, 2003 at 12:52 am
quote:
nice one,i was talking in general
and the precedences of select, from, where, etc.
tried to search on precedences only to find that * > + etc.
and you didn't find anything valuable in BOL?
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
October 10, 2003 at 12:13 pm
SELECT, FROM, WHERE etc are not operators, they are keywords that introduce different parts of a SQL statement. They don't really have a precedence so much as they all have to follow legal SQL syntax. Start with the SELECT statement in Books On Line and look at the syntax diagrams.
A very general syntax would be:
SELECT <fieldlist>
FROM <tables>
WHERE <logicalexpression>
GROUP BY <fields>
ORDER BY <fields>
A statement does not have to have all those parts, but they must be in that order.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply