T-SQL 101: #25 Checking lists of values in SQL Server T-SQL by using the IN operator

added by DotNetKicks
8/16/2019 8:56:28 PM


The T-SQL IN operator allows you to choose from a list of matching values. In the top case shown below: I've said where StateName is one of QLD, NSW, or VIC. Now see that's exactly the same as if I had written the option shown at the bottom where I said: where StateName equals QLD ...