mysql最常用的几个命令总结

来源:互联网 发布:保罗16年数据 编辑:程序博客网 时间:2024/06/05 20:01

Show命令:

Show databases;

Show tables;

Show variables like ‘%connections%’;

 

Use命令:

Use xx;//进入某个表单

 

Create命令:

Create database xx;

Create table yy( zz :varchar(20));

 

Drop命令:

Drop databes xx;

Drop table yy;//是删除,而不是清空

 

Describe命令:

Describe xx;

 

Load命令:

LOAD DATA LOCAL INFILE "xxxt" INTOTABLE xx;

 

Set命令:

Set global xx= 200;//常用来设置mysql系统变量,比如连接数量

 

最常用的sql命令:

Insert into xx values(‘x’);

Drop from xx where x = y;

Select * from xx;

Update xx set y = a, z=b where xx.ss = d;

 

Exit;//退出

0 0
原创粉丝点击