use databasename; 使用某数据库,或切换到某数据库,当前使用的数据库是唯一的
show index from tablename; 展示表的索引
select columnname from tablename where tablename regexp 'exp'; 用正则表达式匹配作为条件来查询满足条件的行
select columnname from tablename where columnname is not null; 搜索某列的值不为空的方法,NULL是一个特殊的东西,不能比较大小,只能比较是或不是
LOAD DATA LOCAL INFILE 'event.txt' INTO TABLE event; 将数据由本地文本文件直接导入到数据库中
SHOW CREATE TABLE shirt; 查看创建表时的sql语句