- create table components2 as select * from components
create table components2 as select * from components
2、只複製另外一個表的結構而不復制數據:
- create table components2 as select * from components where id<1000;
create table components2 as select * from components where id<1000;
注:在components表中id的最小值是1000,所以這裏如果選擇小於這個最小值的行,那麼就是該表的結構。