how can I create a new table selecting specific rows of the old table ?
The selected 3 rows have field1 = 243, 245 and 248 respectively.
Also I need to select the rows with field1 > 0 from table3.
thanks
how can I create a new table selecting specific rows of the old table ?
The selected 3 rows have field1 = 243, 245 and 248 respectively.
Also I need to select the rows with field1 > 0 from table3.
thanks
You can use CREATE TABLE...AS SELECT...
to make a table defined by the columns and data types of a query result set:
CREATE TABLE NewTable AS
SELECT * FROM Table3
WHERE field1 IN (243,245,248);
I can't tell what you mean about field1>0
. I'll leave that to you.
create table new_table like old_table;
insert into new_table select * from old_table where field1 in (243,245,248);
insert into new_table select * from table3 where field1 >0;