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 :: mysql show slave status 
Sql :: delete table cassandra 
Sql :: mysql command prompt date insert format 
Sql :: porcentaje sql 
Sql :: sql pivot rows to columns 
Sql :: 2nd highest value in sql 
Sql :: sql vs nosql or mysql vs mongodb 
Sql :: create unique constraint postgres 
Sql :: mysql get only the field names in a table 
Sql :: Sequelize model datatype of enum 
Sql :: mysql default uuid 
Sql :: sql arithmetic operators 
Sql :: mysql default port number 
Sql :: postgress if 
Sql :: copy table in sql 
Sql :: double in sql server example 
Sql :: having in sql server 
Sql :: how to generate ids in sql 
Sql :: how to select multiple columns from different tables in mysql 
Sql :: sql drop all tables 
Sql :: changing name of column and datatype in sql 
Sql :: trigger sql 
Sql :: mysql workbench 
Sql :: show database not empty tables postgres 
Sql :: Search In the Database using Text 
Sql :: create temp table sql 
Sql :: create atable copy in pgsql 
Sql :: mysql varchar length 
Sql :: postgresql inheritance 
Sql :: not equal in mysql query 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =