(1)、指令:update 資料表名 set 欄位名=值;
說明:將某欄位的所有記錄改成設定的值
實作:將telephone欄位的記錄全部改成字串'0200000000'
update student set telephone='0200000000';

|
(2)、指令:update 資料表名 set 欄位名=欄位名+值;
說明:用於數字
實作:將no欄位的記錄全部加3
update student set no=no+3;

|
(3)、可同時用逗號分隔修改的欄位值,例子如下
| update student set no=no+2,telephone='0211111111'; |
(4)、使用where敘述做條件篩選
將no為5的記錄,telephone記錄改為'1234567890'
update student set telephone='1234567890' where no=5; |
|