Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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.)
Comment

how to create a table based on another table in mysql

Press CTRL+C to copy CREATE TABLE new_tbl [AS] SELECT * FROM orig_tbl;
Comment

PREVIOUS NEXT
Code Example
Sql :: add foreign key to existing table postgres 
Sql :: mysql community server 
Sql :: oracle dynamic select into 
Sql :: select only one row sql 
Sql :: sqlite3 pragma foreign keys 
Sql :: format the money fied with comma in international system using sql 
Sql :: get table column names sql 
Sql :: pg_pretty_size 
Sql :: sql String comparisons case sensitive 
Sql :: SQLITE_BUSY: database is locked 
Sql :: order by ip address sql 
Sql :: mysql on duplicate key ignore 
Sql :: sql order by two columns 
Sql :: sql update 
Sql :: replace tab in sql 
Sql :: postgresql backup and restore globals and data 
Sql :: sql query to create table in database 
Sql :: sql rename column in select query 
Sql :: sql update record 
Sql :: how covert into int in maria db 
Sql :: initcap in sql 
Sql :: sql is null 
Sql :: flask connect to mysql 
Sql :: how to get last inserted id in sql server c# 
Sql :: get stored procedure text sql server 
Sql :: SQL Server run query on linked server 
Sql :: show specific events on mysql 
Sql :: count sql 
Sql :: delete insert record in sql server 
Sql :: SQL get max per id 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =