本章小练习zs

Original 2018-12-21 12:48:32 217
abstract:#插入操作 insert into user_table(id,username,password,email)VALUES(1,'ewrwe','fwefds','3@q.com'); #插入多条操作 insert into user_table(id,username,password,email)VALU
#插入操作
insert into user_table(id,username,password,email)VALUES(1,'ewrwe','fwefds','3@q.com');
#插入多条操作
insert into user_table(id,username,password,email)VALUES(2,'qq','ww','31@q.com'),
(3,'q1','w1','31qwe@q.com'),(4,'qwe','dsfs','vfd@qq.com');
#更新操作
UPDATE user_table SET username='qq2' WHERE id=3;
#查询id等于1的数据
select * from user_table WHERE id=1 ;
select运算 起别名
select 1+1 as ddd
#查询拼接
SELECT CONCAT(id,username) from user_table ;

SELECT COUNT(*) from user_table;
#删除数据
DELETE from user_table WHERE id=4;


Correcting teacher:天蓬老师Correction time:2018-12-21 13:00:36
Teacher's summary:不错, 总结的很简练, 其实, insert ....set 来新增数据也是可以的

Release Notes

Popular Entries