select * into B.AA from A.AA where 1=0

解决方案 »

  1.   

    select top 0 * into 数据库B..aa from 数据库A.aa
      

  2.   

    不过,实现起来怎么又都不行呢?select * into bing.t from temp.t where l = 0
    服务器: 消息 208,级别 16,状态 1,行 1
    对象名 'temp.t' 无效。
    select top 0 * into bing.t from temp.t
    服务器: 消息 208,级别 16,状态 1,行 1
    对象名 'temp.t' 无效。
      

  3.   

    --我的写错了
    select top 0 * into 数据库B..aa from 数据库A..aa
    --1楼的也错了.
    --上面的也应该改为:select * into bing..t from temp..t where l = 0
      

  4.   

    出错提示是什么?下面语句的结果是什么?
    select * from temp..t where l = 0
      

  5.   

    to zjcxc(邹建) sql server中是不是不支持  数据库.表名这种写法啊?
      

  6.   

    安你的説法,應該是從table temp 將表結構Copy到table bing
    參考解決方法:
    select top 0 * into bing..t from temp..t
      

  7.   

    上面有地方說錯了
    安你的説法,應該是從庫temp表t將表結構Copy到庫bing的表t
    參考解決方法:
    select top 0 * into bing..t from temp..t
      

  8.   

    明白了,原来sql server 中的格式应该是  数据库..表名