MySQL常用命令介绍

1.show databases;   输出所有数据库

MySQL常用命令介绍

2.use test;(你选择的数据库);

MySQL常用命令介绍

3.show tables;

     MySQL常用命令介绍

4.show tables in mysql;

MySQL常用命令介绍

5.select database();            MySQL常用命令介绍

6.create table stuinfo(

id int,

name varchar(20));

MySQL常用命令介绍

7.desc stuinfo;

MySQL常用命令介绍

8.INSERT INTO stuinfo(id,NAME) VALUES(1,"john")
   SELECT * FROM stuinfo;

MySQL常用命令介绍

9.UPDATE stuinfo SET NAME="yyzhang" WHERE id=1

MySQL常用命令介绍

10.DELETE FROM stuinfo WHERE id=1;

MySQL常用命令介绍

 

MySQL常用命令介绍