首页 > 代码库 > mysql基本操作

mysql基本操作

 1.创建表:create table if not exists student(id integer(4) primary key auto_increment,name varchar(10),sex varchar(2));

 2.增:insert into student(id,name,sex)values(1,‘zhangsan‘,‘m‘);

 3.删:delete from student where id=1;

 4.改:update student set name=‘lisi‘;

 5.查: select * from student;

 

mysql基本操作