Thursday, June 5, 2014

SQL Server -- Query Table Record Data via TSQL -- WHERE CLAUSE -- AND, O...

When it comes to using SQL Server and writing TSQL queries, you really need to understand the WHERE CLAUSE. It is primarily used to state your criteria, or in other words, how you will be filtering records. Other wise you will return every record in a table or a set of tables, and that is almost never desirable.
 
The structure of the WHERE CLAUSE has a lot of pieces to it and you can nest as many AND and/or OR operators. It is very handy. The video below will get you started.
 
Note: The WHERE CLAUSE always follows the FROM CLAUSE and always PRECEDES the ORDER BY Clause, if the ORDER BY Clause is used. The Order BY Clause is optional. Actually, so is the WHERE Clause. The FROM Clause is also optional, but it is highly unlikely that it will be missing.
 
Most of the time you will be running a query (F5 button) from the command line in SSMS (SQL Server Management Studio) or perhaps from within a stored procedure.
 

 



SQL SERVER COURSE - 95% OFF FOR OUR READERS

For those of you that would like to broaden your understanding of SQL Server, or if you work with someone who needs a little (or a lot of) help :), We are offering a huge discount to one of our most popular online courses. It is the lead off course which discusses tables - what to do and not do. It is very instructional, practical and straightforward.



Normally this course is $199.00, but for a limited time it is available through this offer for only $3.00!   Click the link below to get started:

SQL Server FAST TRACK - Course 101 - Tables

No comments:

Post a Comment