B 用alter来删除索引:
mysql> drop index idx_4a on 4a; Query OK, 0 rows affected (0.41 sec) Records: 0 Duplicates: 0 Warnings: 0
C 用alter来删除主键:
mysql> alter table sc3 drop primary key; Query OK, 17 rows affected (1.00 sec) Records: 17 Duplicates: 0 Warnings: 0
D 用alter来删除,更新表名:
mysql> alter table sc3 rename to gyssc; Query OK, 0 rows affected (0.30 sec) mysql> select * from sc3; ERROR 1146 (42S02): Table 'trains.sc3' doesn't exist
以上就是mysql中关于删除语句大全总结(下)的详细内容,更多请关注php中文网其它相关文章!
……