-
批量导入数据 (数据来源是: 其他数据库中的表)
INSERT INTO dbo.doraInfo
(
oID
, LinkID
, add_time
, add_userID
, add_userName
)
SELECT
ID
, LEFT(NEWID(), 18) AS LinkID
, ''
, convert(varchar,getdate(),23) AS add_time
, 999 AS add_userID
, '' AS add_userName
FROM HsptNetDB.dbo.YaoMing
SELECT * FROM doraInfo
-
转换一个字段的值保存到另外一个字段中
/* -------------------------------- */
-- 转换字段值
UPDATE rstpMain
SET
rstpName0 = rstpName1
, rstpName1 = ''