.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
Sambanthamoorthy

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

difference between Select into and create table statements

Posted By: seattlegirl     Posted Date: June 21, 2011    Points:5   Category :Sql Server
what is the difference between select into and create table statements?
please explain with syntax.

Responses
Author: Gowthammanju             
Posted Date: June 22, 2011     Points: 20   

Hi,

select into



The SELECT INTO statement selects data from one table and inserts it into a different table.

The SELECT INTO statement is most often used to create backup copies of tables.

SELECT *
INTO new_table_name [IN externaldatabase]
FROM old_tablename


but where as


create table




The CREATE TABLE statement is used to create a table in a database


CREATE TABLE table_name
(
column_name1 data_type,
column_name2 data_type,
column_name3 data_type,
....
)


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Ravi Ranjan Kumar             
Posted Date: June 29, 2011     Points: 20   

Hi seattlegirl, Navigate given link and have a go through discussion for expertr answer as well as some nice links
http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/dc7f6267-7170-45e1-86d6-c7d436ac29e0

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com
Author: seattlegirl             
Posted Date: June 30, 2011     Points: 20   

can the constraints and relations also get copied when we use the Select into command?

Author: Narayanan             
Posted Date: July 13, 2011     Points: 20   

Hi,
http://blog.sqlauthority.com/2007/08/15/sql-server-insert-data-from-one-table-to-another-table-insert-into-select-select-into-table/

Select Statement-- Get or Retrieve a information from Table.
Create Table -- Create a Table for your requirement


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: sriram             
Posted Date: October 27, 2011     Points: 20   

select * from <TableName>

Select Statement to Fetching the Records from Database

Insert into employee values('sffdfs','sfsdf');

To insert/storing records on Database

Hope this will help ..

let me know any questions

Regards

Sriram.R



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend