Mysql使用语法总结

[亡魂溺海] 提交于 2019-12-05 23:02:37
  •  查看数据库

show databases;

  •  使用数据库

use honeypot;

  • 查看数据表

show tables;

  • 查看数据表结构

desc TABLEname;

  •  修改数据表的某个字段的类型

alter table awshoneypot15000

modify type int(10);

  • 从一个数据表awshoneypot1000 中取出前15000行并创建新的数据表awshoneypot15000

create table awshoneypot15000 as select * from awshoneypot1000 limit 15000;

  • 删除某个字段

alter table awshoneypot1000

drop locale;

 

更多查询语句参见:http://c.biancheng.net/view/2425.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!