2021-03-23 sql常见语句 sql常见语句 1 查询语句( select )-- 通过 * 把 users 表中所有的数据查询出来 select * from users -- 从 users 表中把 username 和 password 对应的数据查询出来 select username, password from users2 添加语句( insert into )-- 向 users 表中,插入新数据,username 的值为 tony stark password 的值为 098123 insert into users (username, password) values ('tony stark', '098123')3 修改语句( update )-- 将 id 为 4 的用户密码,更新成 888888 update users set password='888888' where id=4 -- 更新 id 为 2 的用户,把用户密码更新为 admin123 同时,把用户的状态更新为 1 update users set password='admin123',status=1 where... 拾光° 2021-03-23 技巧,数据库 380 阅读 0 评论 2021年03月23日 380 阅读 0 评论