insert into hao (mima) values select top 1 * from biao执行这个语句的时候说
“服务器: 消息 156,级别 15,状态 1,行 1 在关键字 'select' 附近有语法误。
”请问哪里错了啊。

解决方案 »

  1.   

    --试试
    insert into hao (mima) values select top 1 列 from biao
      

  2.   

    insert into hao (mima) select top 1 * from biao多了个values
      

  3.   

    表biao只有一个字段吗?
    insert into 表名1
    (字段名1,字段名2,.....)
    select 字段名1,字段名1,.....
    from 表名2
    where 条件
      

  4.   

    insert into table1 (字段1,字段2,字段3....字段n)
    select 字段1,字段2,字段3....字段n from table2 where XXXXX
      

  5.   

    insert into hao(mima) select top 1 * from biao
      

  6.   

    表biao只有一列的情况下,你的语句没问题,但是不可能这个表只有一列呀.
    所以你要在语句中指定各个列.
      

  7.   

    insert into hao (mima) select top 1 (字段) from biao
      

  8.   

    insert into hao (mima) values select top 1 * from biao--这里的*为一列数为多少
      

  9.   

    insert into hao (mima) select top 1 mima from biao
      

  10.   

    答案:insert into hao (mima) values select top 1 列名 from biao--不然是选出来整行
      

  11.   

    inser into hao(mima) values(select top1 列名 from biao)