Insert data from one table to another table
You can insert the data from one table to another table using SELECT INTO and INSERT INTO with SELECT.. FROM clause.
– Below statement will create the temp table to insert records
select * INTO #tmpObjects from sys.sysobjects where type = ‘u’
– Below statement will create the user table to insert records.
– First will create the table and insert it details as well in new table
select * INTO tmpObjects from sys.sysobjects where type = ‘u’
–Below statement will insert new data into table
insert into tmpObjects SELECT * from sys.sysobjects where type = ‘s’
No comments:
Post a Comment