Tag: WHERE
Using IN, ANY, and ALL Queries
ANY and ALL queries are related to IN queries in that they are used for multi-row returns. They also allow comparisons to be made (equal, not equal, greater than, less than, etc.).
Continue Reading...Restricting Data – Selection in the WHERE Clause
Exam Topic: Restricting and Sorting Data – Limit the rows that are retrieved by a query Returning the right data by restricting rows to answer questions is at the heart of SQL Development. As shown in The Capabilities of a SQL SELECT Statement, the WHERE clause is used to specify conditions for which rows should be returned. If the […]
Continue Reading...The Capabilities of a SQL SELECT Statement
Exam Topic: Retrieving Data Using the SQL SELECT Statement – List the capabilities of SQL SELECT statements By far, the most important skill for anyone to possess when working with a database is the skill to extract from the database the data you want in the format you desire. The SELECT statement, therefore, is the most important […]
Continue Reading...Null Parameters in WHERE Conditions
When building a procedure, I want to be able to pass a parameter or pass a NULL if I don’t want to search by a parameter. Some people will tell you to accomplish this that you should write a dynamic SQL statement so you can add or remove parameters as needed. I avoid Dynamic SQL […]
Continue Reading...