Wednesday, November 23, 2011

Difference between Select From and Select Into statement in TSql server?

Actually select statement is frequently used in quering one or more tables to get the result set as excepted by the end user.

1.Select */columnname1,columnname2,columnname3... from tablename: It is used to retrieve all the data values present in the table emp.It can't transfer any values to other tables but instead it retrieves the result set by combining one or more tables using joins or no joins at all.

2.Select column1,column2 or * into new_table_name from
old_table_name:Select into statement is used to transfer the values from existing table to new table as shown above using joins or no joins at all.