zoukankan      html  css  js  c++  java
  • SQL SERVER 批量插入记录

    --create function insertData(@count as int,@tsn as bigint,@id as int)
    --as 
    --begin
    SET IDENTITY_INSERT Table_Name OFF
    declare @tsn  bigint --这儿用int会溢出
    declare @count int
    declare @id int
    
    set @count= 0
    set @tsn = 678833010119069
    set @id= 24982
    
    while(@count<10)
    begin
        set @tsn=@tsn+1
    	set @id=@id+1
    	set @count=@count+1
    	
    Insert into Table_Name (Col-Name,....)
    values (
    	'0',
    	'',	
    	@tsn,
    	@tsn,
    	'5',
    	@tsn,
    	'123456',	
    	@tsn,
    	'1',	
    	'1',	
    	'',
    	'',
    	'',
    	'0',	
    	'0',
    	'0',
    	'',
    	'0',
    	'0',
    	'',
    	'',
    	'2015/7/4',
    	'8',	
    	'0',
    	'2016/7/4',
    	'1190',
    	'0',
    	'0',
    	'0',
    	'0',
    	'0',
    	'',
    	'0',
    	'0',
    	'0',
    	'0',
    	'1',
    	'0',
    	'2015/10/15 13:18',
    	'2015/7/4 13:31',
    	'053255678033',
    	'',
    	'',
    	'120',
    	'0',
    	'1',
    	'',
    	'a4bf5d7e-ce3d-47db-b899-eb2d665c0578',
    	'1',
    	'1',	
    	'0',
    	'',
    	'0',
    	'1',
    	'0'
    )
    end
    

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    DDoS攻击
    CSRF攻击
    正向代理和反向代理
    DNS协议
    四次挥手
    Nginx重要概念之lingering_close
    Nginx重要概念之pipeline
    Nginx重要概念之keepalive
    http1.0、http1.1、http2.0三者的区别
    Vue axios封装二
  • 原文地址:https://www.cnblogs.com/andy-2014/p/4964241.html
Copyright © 2011-2022 走看看