企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[https://www.cnblogs.com/HLBBLOG/p/14271728.html](https://www.cnblogs.com/HLBBLOG/p/14271728.html) [https://www.cnblogs.com/HLBBLOG/p/14248912.html](https://www.cnblogs.com/HLBBLOG/p/14248912.html) ~~~sql create database +数据库名; ~~~ ~~~sql create table test(id int,name varchar(32)); ~~~ 只复制表结构和数据,但是不复制相关约束 ~~~sql create table test2 as select * from test1; ~~~ 只复制表结构及约束,但不复制数据 ~~~sql create table test2 like test1; ~~~ 修改表明 ~~~sql alter table test1 rename test2; ~~~ 2.添加字段 ~~~sql alter table test1 add id int alter table test1 add column id int ~~~ 3.删除字段 ~~~sql alter table test1 drop column id ~~~ 4.添加索引 ~~~sql alter table test1 add index idx_id(id) ~~~ 三.drop 1.删除数据库 ~~~sql drop database + 数据库名 ~~~ 2.删除表 ~~~sql drop table test1 ~~~