Sunday, 9 October 2011

DML-select-Into

nThe SELECT INTO statement selects data from one table and inserts it into a different table.
nThe SQL SELECT INTO statement can be used to create backup copies of tables.
Syntax:
üSELECT * INTO new_table_name [IN externaldatabase]
FROM old_tablename
üSELECT column_name(s) INTO new_table_name [IN externaldatabase]
FROM old_tablename
Query:
üSELECT * INTO EMPtbl1_Backup FROM EMPtbl1
üSELECT * INTO EMPtbl1_Backup IN 'Backup.mdb‘ FROM EMptbl1
üSELECT EMPname, company INTO EMPtbl1_Backup
FROM Emptbl1

No comments:

Post a Comment