Select is a DCL command it is having lot of Explanation for our understand i will provide a simple explanation
Order of the Select list keywords:
SELECT
FROM
JOIN
ON
WHERE
GROUP BY
ORDER BY
HAVING
Example :
SELECT RTRIM(S.name) FROM sys.tables S JOIN
sys.indexes I ON S.OBJECT_ID=I.OBJECT_ID
WHERE OBJECT_NAME(S.OBJECT_ID) LIKE 'TBL_%'
GROUP BY S.name ORDER BY S.name
http://mssqldevelopersaran.blogspot.com
Order of the Select list keywords:
SELECT
FROM
JOIN
ON
WHERE
GROUP BY
ORDER BY
HAVING
Example :
SELECT RTRIM(S.name) FROM sys.tables S JOIN
sys.indexes I ON S.OBJECT_ID=I.OBJECT_ID
WHERE OBJECT_NAME(S.OBJECT_ID) LIKE 'TBL_%'
GROUP BY S.name ORDER BY S.name
http://mssqldevelopersaran.blogspot.com
No comments:
Post a Comment