create table tablename as select * from tablename
CREATE TABLE new_table
AS (SELECT * FROM old_table);
create table tablename as select * from tablename
CREATE TABLE new_table
AS (SELECT * FROM old_table);
how to create a table structure from another table in mysql
CREATE TABLE new_tbl LIKE orig_tbl; //(creates an empty table only definition is
same.)
mysql select into new table
CREATE TABLE artists_and_works
SELECT artist.name, COUNT(work.artist_id) AS number_of_works
FROM artist LEFT JOIN work ON artist.id = work.artist_id
GROUP BY artist.id;
sqlserver create table from select
Select * into new_table from old_table
sql create table with columns as another table
SELECT * INTO newtable FROM oldtable WHERE 1 = 0;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us