hi today i would like to discuss on few useful tips
SELECT * into vs Insert into from select list
SELECT into:
EX: SELECT * into TEMP_Backup from Temp
First a table is created TEMP_Backup and then data is inserted into TEMP_Backup from Temp so there are two steps performed
Where as if i already have a table existing with same structure and datatypes then :
Insert into TEMP_Backup
SELECT * from Temp
This steps inserts the data to TEMP_Backup table and here we don't have to create a table , so less overhead if it is with a big table
Both of them works with global, local temporary tables :
Thanks
SELECT * into vs Insert into from select list
SELECT into:
EX: SELECT * into TEMP_Backup from Temp
First a table is created TEMP_Backup and then data is inserted into TEMP_Backup from Temp so there are two steps performed
Where as if i already have a table existing with same structure and datatypes then :
Insert into TEMP_Backup
SELECT * from Temp
This steps inserts the data to TEMP_Backup table and here we don't have to create a table , so less overhead if it is with a big table
Both of them works with global, local temporary tables :
Thanks
No comments:
Post a Comment