From ed95e210ff99d9d29938fb25cd41255b3d9eb517 Mon Sep 17 00:00:00 2001 From: smallkun Date: Thu, 20 Feb 2025 16:58:46 +0800 Subject: [PATCH] Auto commit --- 2208/练习(一).md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/2208/练习(一).md b/2208/练习(一).md index 5cd4f3a..d712104 100644 --- a/2208/练习(一).md +++ b/2208/练习(一).md @@ -110,7 +110,21 @@ DELETE FROM booktype WHERE type_id = 1; ``` +**更新图书** +将图书表的图书备注更新成作者名 备注的组合 + +```sql +/* +更新 +UPDATE 表名 +SET 字段名=新值 +WHERE 条件; +*/ +#将图书表的图书备注更新成作者名 备注的组合 +UPDATE book +SET book_remark = CONCAT(book_author,' ',book_remark); +``` ## MySQL查询