Categories


SELECT * 
FROM CATEGORIES

SELECT CategoryID 
      ,CategoryName
      ,Description
FROM CATEGORIES
ORDER BY CategoryName

--cannot order by Description because it is an 'ntext' field
--The text, ntext, and image data types cannot be used in an ORDER BY clause.


SELECT * 
FROM CATEGORIES
WHERE CategoryName = 'Produce'

this is an example of a column alias / column name

SELECT CategoryName As Category_Name 
FROM CATEGORIES
WHERE CategoryName = 'Produce'
OR CategoryName = 'Seafood'


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext