Blogger Information
Blog 23
fans 1
comment 0
visits 29626
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
创建数据库--PHP中文网第九期线上班
Liu
Original
1168 people have browsed it

创建数据表,每张表有10个字段(截图)

php中文网线上班级表

MYSQL 插入语句

  1. INSERT `php_class` (
  2. `class`,
  3. `name`,
  4. `studentNum`,
  5. `sex`,
  6. `area`,
  7. `head_teacher`,
  8. `html_teacher`,
  9. `php_teacher`,
  10. `laravel_teacher`
  11. )
  12. VALUES
  13. (
  14. 'PHP中文网第九期线上班',
  15. '卷卷',
  16. '1782653',
  17. '男',
  18. '台湾',
  19. '朱老师',
  20. '朱老师',
  21. '欧阳克',
  22. '西门大官人'
  23. )

MYSQL 删除语句

删除id=7的这条数据

  1. DELETE
  2. FROM
  3. `php_class`
  4. WHERE
  5. `id` = 7

MYSQL 更改语句

把整个表字段为laravel_teacher=’西门大官人’改为’更改老师’

  1. UPDATE `php_class`
  2. SET
  3. `laravel_teacher` = '更改老师'
  4. WHERE
  5. `laravel_teacher` = '西门大官人'

MYSQL 查询语句

查询这张表字段head_teacher(班主任)=朱老师的表

  1. SELECT
  2. `head_teacher`
  3. FROM
  4. `php_class`
  5. WHERE
  6. `head_teacher` = '朱老师'

查询结果

" class="reference-link">查询语句结果

最终更改数据表
最终数据表

手抄一遍增删改查语句

增删改查语句手抄代码

Correcting teacher:查无此人查无此人

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