zoukankan      html  css  js  c++  java
  • SQL语句创建表并插入指定N条数据(用于测试)

    CREATE TABLE [dbo].[TestTable](  
    [D_Id] [int] IDENTITY NOT NULL,
    [D_Name] [varchar](50) NULL,
    [D_Password] [varchar](32) NULL,
    [D_Else] [varchar](4000) NULL,
    CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
    ([D_Id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    DECLARE @d datetime
    SET @d=getdate() --计时开端
    DECLARE @index INT
    SET @index = 1
    WHILE @index<50000
    BEGIN
    INSERT INTO TestTable(D_Name,D_Password,D_Else)
    VALUES(""名称"",""暗码测试"",""其他"")
    SET @index=@index+1
    END
    SELECT [语句履行花费时候(毫秒)]=datediff(ms,@d,getdate()) --计时停止
  • 相关阅读:
    HDU5873
    HDU5874
    HDU1565(状态压缩dp)
    POJ2774(二分+哈希)
    HDU4474
    HDU2602(背包)
    单链表
    POJ2503(hash)
    POJ1200(hash)
    顺序表
  • 原文地址:https://www.cnblogs.com/rc727512646/p/2739263.html
Copyright © 2011-2022 走看看