O'Reilly logo

Visual Basic® .NET Database Programming by Rod Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SELECT

The SELECT statement is one of the most complicated SQL statements. It’s so complicated that only its most useful variations are described here.

The SELECT statement lets you select data and return it to your application, insert it in another table, use it to create a temporary table, or use it in another query.

The basic syntax for a SELECT statement is

SELECT [DISTINCT] [TOP number [PERCENT]] fields 
[INTO table] 
FROM tables 
[WHERE where_conditions] 
[GROUP BY group_by_expression] 
[HAVING search_conditions[ 
[ORDER BY order_fields [ASC | DESC]] 

The following sections describe the different SELECT statement clauses.

SELECT

The fields parameter indicates the fields that should be selected by the statement. If the fields are all taken ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required