What is the difference between a keyword and a clause in SQL?
I understand that an offer is a means of filtering data defined for certain conditions. So WHERE
being a condition gives me full meaning.
But in some of the tutorials I've watched I've seen AND
/ OR
called keywords. It seems to me that both of them would be a reservation.
Can anyone help me understand this better?
source to share
Clarifying an example
SELECT col1
,col2
,col3
FROM yourTable1 AS t1
INNER JOIN yourTable2 AS t2 ON t1.Id = t2.Id
WHERE col1 = 'aaaa'
AND col2 = 'bbbb'
ORDER BY col1
Is it an operator SELECT
or a request
FROM yourTable1 AS t1 INNER JOIN yourTable2
==> FROM
offer
ON t1.Id = t2.Id
==> ON
clause
WHERE col1 = 'aaaa' AND col2 = 'bbbb'
==> WHERE
article
ORDER BY col1
==> ORDER BY
article
SELECT
, FROM
, WHERE
, ON
, AS
, AND
, ORDER BY
- all keywords
source to share
Maybe this will help Reserved keywords :
Microsoft SQL Server uses reserved keywords to define, manipulate, and access databases. Reserved keywords are part of the Transact-SQL grammar that SQL Server uses to parse and understand Transact-SQL statements and batches. While it is syntactically possible to use SQL Server reserved keywords like identifiers and object names in Transact-SQL scripts, you can only do so by using delimited identifiers.
WHERE
and AND
are Keywords
and CLAUSES
.
source to share