Thursday, December 16, 2010

CREATE TABLE STRUCTURE FROM EXISTING TABLE IN MYSQL


CREATE TABLE LIKE-create same structure table
To create a new table which has the same STRUCTURE as a table that already exists,
but is empty, you can use the CREATE TABLE LIKE command.




SYNTAX:
CREATE TABLE NEW_TABLENAME LIKE EXISTING TABLE NAME;

Example:
create table work like office;

No comments:

Post a Comment