this method can be used to copy table data
example:
you have table_a and table_b,
you want to copy data from table_a to table_b
this is the sql you can use:
insert into table_b (id, name, number)that will copy all data from table_a to table_b.
select id, name, number
from table_a
you can use where if you want to copy data with specific condition.
insert into table_b (id, name, number)try it yourself,
select id, name, number
from table_a
where id<10
and thanks for reading
No comments:
Post a Comment