SELECT...INTO
The SELECT...INTO statement is another way you can create a new table. This method differs from the CREATE TABLE method in that the structure of the table to create is not explicitly stated, rather it is determined by the results of a SELECT statement. Table 21.11 lists the components of the SELECT...INTO statement.
Component | Description |
---|---|
SELECT INTO | Specifies the table to be created. |
column list | Specifies the columns of the new table and their attributes. |
Using SELECT...INTO to Create a New authortitles Table
Suppose you want to store the results of a SELECT statement in a table for use later in your application or in a report. The SELECT...INTO statement enables you to do just that. ...
Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition 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.