创建数据表,每张表有10个字段(截图)
MYSQL 插入语句
INSERT `php_class` (
`class`,
`name`,
`studentNum`,
`sex`,
`area`,
`head_teacher`,
`html_teacher`,
`php_teacher`,
`laravel_teacher`
)
VALUES
(
'PHP中文网第九期线上班',
'卷卷',
'1782653',
'男',
'台湾',
'朱老师',
'朱老师',
'欧阳克',
'西门大官人'
)
MYSQL 删除语句
删除id=7的这条数据
DELETE
FROM
`php_class`
WHERE
`id` = 7
MYSQL 更改语句
把整个表字段为laravel_teacher=’西门大官人’改为’更改老师’
UPDATE `php_class`
SET
`laravel_teacher` = '更改老师'
WHERE
`laravel_teacher` = '西门大官人'
MYSQL 查询语句
查询这张表字段head_teacher(班主任)=朱老师的表
SELECT
`head_teacher`
FROM
`php_class`
WHERE
`head_teacher` = '朱老师'
查询结果
" class="reference-link">
最终更改数据表