数据库
首页 > 数据库> > 数据导入相关的SQL脚本

数据导入相关的SQL脚本

作者:互联网

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 = ''

 

标签:脚本,dbo,LinkID,userID,rstpName1,add,导入,SQL,SELECT
来源: https://www.cnblogs.com/karkash/p/15662659.html