![]() |
|||
Simple insert Query
By: rekha singh | 28 Apr 2010 1:07 pm
Simple insert Query insert into <Table Name> <fileld name>values<field value> Insert into sqldemo (id,password,status) values('sds','sad','sdsa');
Insert into <Table Name> select <column name1>,<column name N> from <Table name>
example
Insert into sqldemo select id,password,status from sqldemo1;
Here
->sqldemo is destination table
->sqldemo1 is source table
Insert into <Table Name> select <column name1>,<column name
n> from <table name> where <condition>
example
Insert into sqldemo select id,password,status from sqldemo1
where id like 'a%';
this query is used in inserting data into table.
|
