原文:SQL 兩表關聯更新UPDATE (用一個表更新另一個表)

方法一: updatetable setfield table .field fromtable where table .id table .id 簡寫 update t set t .c t .c from t where t .c t .c 方法二: update table set field select top field from table where table .id tabl ...

2021-09-25 10:51 0 420 推薦指數:

查看詳情

mySQL:更新(用一個更新另一個)的SQL語句

一個中的字段去更新另外一個中的字段, MySQL 中有相應的 update 語句來支持,不過這個 update 語法有些特殊。看一個例子就明白了。 create table student ( student_id int not null ...

Tue Feb 14 23:59:00 CST 2017 1 49634
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM