26
loading...
This website collects cookies to deliver better user experience
Select [Column Names | *]
Where [Column Name] [operator] [criteria]
Select [Column Names | *]
Where [Column Name] [operator] [criteria]
AND | OR [Column Name] [operator] [criteria]
This will all make more sense when we actually make use of these query statements in SSMS.
=
<, >, >=, <=
Between (inclusive) - for dates and numbers.
Select firstName
From Person.Person
Where firstName = 'John'
When we have a criteria that is a string we need to enclose it in quotation marks. This can be either double quotes or single quotes, however remember you cannot mix the two.
'John" - This will be invalid.
Select *
From Person.Person
Where BusinessEntityID between startValue and endValue