在VS2005中想要删除数据库中的某个表aa的语句怎么写? 是删除整个表 连字段这些都不存在的另外:
select a.a1,a.a2,b.b1,b.b2  into aa from table1  a,table2 b  where a.a1=b.b1
在获得上面的查询结果后 select * from 查询结果 where 某个字段=‘xx’两句要怎么合起来?select * from(select a.a1,a.a2,b.b1,b.b2  into aa from table1  a,table2 b  where a.a1=b.b1
)where  某个字段=‘xx’这么写的话 就会出现;在关键字 'into' 附近有语法错误。请问要怎么改?

解决方案 »

  1.   

    1.drop table aa
    2.select *  from (select a.a1,a.a2,b.b1,b.b2  from table1  a,table2 b  where a.a1=b.b1)aa where 某个字段='xx'
      

  2.   

    在VS2005中想要删除数据库中的某个表aa的语句怎么写? 是删除整个表 连字段这些都不存在的 
    --
    drop table aaselect * from(select a.a1,a.a2,b.b1,b.b2  into aa from table1  a,table2 b  where a.a1=b.b1 
    )where  某个字段=‘xx’
    --
    select * from (select a.a1,a.a2,b.b1,b.b2  from table1  a,table2 b  where a.a1=b.b1 
    ) as a where  某个字段=‘xx’
      

  3.   

    1、删除表
    drop table aa
    go2、select * 
       from(select a.a1,a.a2,b.b1,b.b2 
            from table1  a,table2 b  
            where a.a1=b.b1)
       where  某个字段=‘xx’参考!