//查看mysql版本
select version();
//查看日期
select date();
//查看时间
select time();
//添加主键
alter table ta add primary key(id);
//将文本中的数据导入MYSQL数据库
load data local infile "E:/a.txt" into table tt;
//将数据导出到文本
select * from tt into outfile "E:/cc.txt";
//多表查询
select tt.name,ta.pp,ta.yy from tt,ta where ta.id=tt.id and tt.name='aa';
//表里面增加一列"sex"
alert table ta add column sex char(1);
//显示服务器运行状态
show status;
//创建索引
create index aa on tt(name);
//在另一个表中得到查询条件
select * from score where event_id in (select event_id from event where type='T');
select version();
//查看日期
select date();
//查看时间
select time();
//添加主键
alter table ta add primary key(id);
//将文本中的数据导入MYSQL数据库
load data local infile "E:/a.txt" into table tt;
//将数据导出到文本
select * from tt into outfile "E:/cc.txt";
//多表查询
select tt.name,ta.pp,ta.yy from tt,ta where ta.id=tt.id and tt.name='aa';
//表里面增加一列"sex"
alert table ta add column sex char(1);
//显示服务器运行状态
show status;
//创建索引
create index aa on tt(name);
//在另一个表中得到查询条件
select * from score where event_id in (select event_id from event where type='T');