当前位置:   article > 正文

数据库:DQL 数据查询语言_dql数据查询语言

dql数据查询语言

DQL 数据查询语言
1)select

增-insert:

insert into user(username,password) values(‘user1’,‘123’);

insert into user123(user,sex)values('user12','man');
  • 1

删-delete:

delete from user where id=5;

DELETE FROM `myweb`.`user123` WHERE `id` = 4;
  • 1

检测是否能删除

desc DELETE FROM `myweb`.`user123` WHERE `id` = 4\G
  • 1

改-update:

update user set password=‘123’ where id=2;
update user set username=‘user33’,password=‘123’ where id=3;

UPDATE `myweb`.`user123` SET `user` = 'user123333' WHERE `id` = 2
  • 1

查-select:

select * from user;
#查询表中所有字段以及每个字段所对应的所有记录

select * from user123;
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/701172
推荐阅读
相关标签
  

闽ICP备14008679号