Blogger Information
Blog 34
fans 0
comment 0
visits 20290
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
MySql 常用 DDL - DML 语句
小庄
Original
781 people have browsed it

MySql 常用 DDL - DML 语句


  1. /* mysql 常用DDL DML */
  2. /*
  3. DML:
  4. insert,delete,update,select等
  5. */
  6. /* 添加数据 */
  7. INSERT into users(uname,pwd,updata_time) VALUE('zhangsan','e10adc3949ba59abbe56e057f20f883e','1629358407');
  8. INSERT into users(id,uname,pwd,updata_time) VALUE(2,'lisi','e10adc3949ba59abbe56e057f20f883e','1629358407');
  9. INSERT into users(uname,pwd,updata_time) VALUE('wangwu','e10adc3949ba59abbe56e057f20f883e','1629358407');
  10. INSERT into users(uname,pwd,updata_time) VALUE('daming','e10adc3949ba59abbe56e057f20f883e','1629358407');
  11. INSERT into users(uname,pwd,updata_time) VALUE('xiaoming','e10adc3949ba59abbe56e057f20f883e','1629358407');
  12. /* 删除数据 删除数据一定要带上where 条件,否则就准备跑路吧*/
  13. delete from users where uname = 'lisi';
  14. /* 更新数据 */
  15. update users set uname = 'wangwu222' where uname = 'wangwu';
  16. /* 查询数据 */
  17. select id,uname,create_time,updata_time from users where id >= 3;
  18. /*
  19. DDL:
  20. databse,table等
  21. */
  22. /* 创建数据库 */
  23. create database test default character set utf8mb4 -- UTF-8 Unicode collate utf8mb4_unicode_ci;
  24. /* 删除数据库 */
  25. drop database test;
  26. /* 显示已存在的数据库 */
  27. show databases;
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!