oracle92中:select *,A.address,B.address
from Flights,ariports as A,airports as B
where 
  departureCode in
  (
    select airportID
    from Airports
    where address='北京'
  )
  and
  arrivalCode in
  (
    select airportID
    from Airports
    where address='南京'
  )
;from Flights,ariports as A,airports as B
                      *
ERROR 位于第 2 行:
ORA-00933: SQL 命令未正确结束请问oracle能用as子句吗?

解决方案 »

  1.   

    去掉as
    select *,A.address,B.address 
    from Flights,ariports A,airports B 
    where  
      departureCode in 
      ( 
        select airportID 
        from Airports 
        where address='北京' 
      ) 
      and 
      arrivalCode in 
      ( 
        select airportID 
        from Airports 
        where address='南京' 
      ) 
      

  2.   

    能用啊
    不过一般不用写as
    你改成这样试试oracle92中: select f.*,A.address,B.address 
    from Flights f,ariports a,airports  B 
    where  
      departureCode in 
      ( 
        select airportID 
        from Airports 
        where address='北京' 
      ) 
      and 
      arrivalCode in 
      ( 
        select airportID 
        from Airports 
        where address='南京' 
      ) 

      

  3.   


    select F.flightName,A.address,B.address
    from Flights F,Ariports A,Airports B
    where 
      departureCode in
      (
        select airportID
        from Airports
        where address='北京'
      )
      and
      arrivalCode in
      (
        select airportID
        from Airports
        where address='南京'
      )
    ;from Flights F,Ariports A,Airports B
                   *
    ERROR 位于第 2 行:
    ORA-00942: 表或视图不存在
      

  4.   

    1)表别名不能用AS,字段别名可用可不用AS 。
    2)列字段名时如果用了单独的 * 就不能加其他的字段名了。
      

  5.   

    好晕啊,这里打错了,行了,谢谢各位解答哦!
    Airports打成
    Ariports
      

  6.   

    Flights这个表存在吧?或者有权限访问吧?
      

  7.   

    from Flights,ariports as A,airports as B 
                               * 
    ERROR 位于第 2 行: 
    ORA-00933: SQL 命令未正确结束 
    ariports
     *错误提示的 * 还是很重要的。