SELECT Statements

As a review, the syntax of the SELECT statement is as follows:

SELECT <select_list>
FROM <table_source>
WHERE <search_condition>
					

Where the following are the options:

Option Description
<select_list> This is either a list of the individual columns you want to select out of a table or an asterisk (*), which symbolizes that you want to select all data from the table.
<table_source> This is a list of all the tables from which you are selecting. If you add more than one table here, you must also create a link (called a join) between the two tables to ensure that you receive the expected results. There is more information on joins in the next chapter.
<search_condition> The search condition is used to limit the number ...

Get Writing Stored Procedures for Microsoft SQL Server now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.