Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要将相同的行插入到我使用的表中
Insert into table (select * from table where columnA = 'a' and columnB = 'b')
我可以在一个 sql 中插入和更改 columnB = 'c' 吗?
是的,只需在选择中指定值:
insert into table (ColumnA, ColumnB) select ColumnA, 'c' from table where columnA = 'a' and columnB = 'b'
(如果您有更多列,只需将它们添加到列列表中,然后像 ColumnA 一样选择。)