1.查询sql:
select * from a order by id desc limit 0,1 \G;
select * from a where id=‘’ and no='';
select * from a,b where a.id=b.id and no=‘’;
select discount(name) from a;
show create table a;
select * from a where creattime between ‘2014-5-2 09:09:08’ and ‘2014-5-3 08:08:09’;
select * from a where creattime > ‘2014-5-2 09:09:08’ ;
select * from a where class in(select class from b where name=’s’);
use a;
show databases;
show tables;
desc a;
update gwroutedefault set gwrouteStatus=0 where id=3;
insert into a values(,,,,);
delete from a where id=‘’;
2.
1)登录mysql数据库 mysql -u 用户名 -p密码 -h 主机ip -p 端口号
mysql -umeiliwork -pTqs2nHFn4pvgw -h 172.16.5.63 -P 3601
2)exit
推出
sql
命令