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.
我有一种情况,我想使用现有的列值在表中插入值,但修改了一个日期列。我可以尝试使用表中的 select 语句插入值,但是如何为日期列添加不同的值?
示例:(这会复制另一条记录,但将日期设置为另一个显式值)
INSERT [table] (col1, col2, col3, datecol, othercol) SELECT col1, col2, col3, '20130104', othercol FROM [table] WHERE pk_id = 4;