MySQL 管理表:
增加行:
添加一行: insert into user values
(42,"bbb","x",1003,1003,"teacher","/home/jingyaya3","/bin/bash"); #添加所有列 insert into tarena.user(name,uid,shell) values ("aaa",1002,"/sbin/nologin"); #不完全添加列,其他列为null
insert into tarena.user set name="aa" , uid=99 , gid=99 ; 添加多行: insert into tarena.user values #添加所有列 (41,"aaa","x",1002,1002,"teacher","/home/jingyaya2","/bin/bash"), (42,"bbb","x",1003,1003,"teacher","/home/jingyaya3","/bin/bash"); insert into tarena.user(name,uid,shell)values #不完全添加列,其他列为null ("b2",1002,"/sbin/nologin"), ("b3",1003,"/sbin/nologin");
删除行,删除表,删除库:
delete from user where id <= 10 ; #删除行
drop tables user; #删除表
drop database mysql; #删除库
修改行:
update user set comment=NULL where id <= 10 ;
标签:insert,into,tarena,改查,添加,user,MySQL,增删,1003 From: https://www.cnblogs.com/wanran/p/17616152.html