declare @ww intset @ww=0while  @ww<100)
begininsert into 单选题(单选题题目) values (@ww+1) where 单选题题目=@ww
set @ww=@ww+1
end 
说是where附近有语法错误!怎么回事?

解决方案 »

  1.   

    INSERT INTO 语句
    INSERT INTO 语句用于向表格中插入新的行。语法
    INSERT INTO 表名称 VALUES (值1, 值2,....)我们也可以指定所要插入数据的列:INSERT INTO table_name (列1, 列2,...) VALUES (值1, 值2,....)
      

  2.   

    改成这样也是错的!~
    declare @ww intset @ww=0while  @ww<100)
    begininsert into 单选题(单选题题目) values (@ww+1)
    set @ww=@ww+1
    end 
    怎么回事,兄台们说说啊!
      

  3.   

    insert into 还有 where?
      

  4.   


    declare @ww int set @ww=0 while  @ww <100
    begin insert into 单选题(单选题题目) values (@ww+1) 
    set @ww=@ww+1 
    end 
      

  5.   

    insert into 单选题(单选题题目) values(@ww+1)
    set @ww=@ww+1 
      

  6.   

    declare @ww int set @ww=0 while  (@ww <100)--掉了个括号 
    begin 
    insert into 单选题(单选题题目) values (@ww+1) where 单选题题目=@ww 
    set @ww=@ww+1 
    end 
      

  7.   

    不好意思
    漏掉啦declare @ww int set @ww=0 while  (@ww <100)--掉了个括号 
    begin 
    insert into 单选题(单选题题目) values (@ww+1) --这个地方去掉where 单选题题目=@ww 
    set @ww=@ww+1 
    end 
      

  8.   

    declare @ww int set @ww=0 while  (@ww <100)--掉了个括号 
    begin 
    insert into 单选题(单选题题目) values (@ww+1) --这个地方去掉where 单选题题目=@ww 
    set @ww=@ww+1 
    end