我必须在表中添加几列,然后在 SQL Server 2008 中更新它们。表定义归结为:
CREATE TABLE tbl (id INT PRIMARY KEY,
dvt NVARCHAR(32),
dd NVARCHAR(32));
INSERT INTO tbl (id, dvt, dd)
VALUES(1, '1', NULL);
INSERT INTO tbl (id, dvt, dd)
VALUES(2, '', NULL);
INSERT INTO tbl (id, dvt, dd)
VALUES(3, '2,5', NULL);
INSERT INTO tbl (id, dvt, dd)
VALUES(4, '13, 34, 45, 5', NULL);
INSERT INTO tbl (id, dvt, dd)
VALUES(5, '-1, 8, 10', NULL);
INSERT INTO tbl (id, dvt, dd)
VALUES(6, '-2, -10', NULL);
如何在创建表的同一事务中向表中添加数据?