How to use SELECT INTO Statement in SQL

In this article I am going to explain how to use SELECT INTO statement in SQL.
  • 2109

Introduction

In this article I am going to explain how to use SELECT INTO statement in SQL. INTO clause is used to create a new table. This new table is created on the base of result set defined by the SELECT statement. 

SELECT INTO statement create a new table and put the name after INTO clause so table name must be unique. 

In this example this statement creating a new temp table.

Example

select * into temp from mcninvoices

Output

Clipboard05.jpg


© 2020 DotNetHeaven. All rights reserved.