with a as (select * from t_bus)ora-00928 缺失select 关键字

解决方案 »

  1.   

    with a as (select * from t_bus)
    select * from a
      

  2.   


    with cte as 
    (
      select * from t_bus;
    )
    select * from cte;
      

  3.   

    with cte as  
    (
      select * from t_bus;
    )
    select * from cte;后面那个select * from cte;必须加么
      

  4.   

    with a as (select * from t_bus)
    select * from a;
      

  5.   

    这个结果  我再和另一个表做联合查,怎么用?
    比如  
    with a as (select * from t_bus)
    select * from a;这个结果  a.*,b.* from a,b
      

  6.   

    with a as 
    (select * from t_bus)
    select a.*,b.* from a,b where .....
      

  7.   


    with a as (select * from t_bus)
    select a.*,b.* from a,b;
    with 就是为后面的select做一个临时表,直接用就行
      

  8.   

    7楼正解,width的用法就是再为后面的as 查询做一个临时表,然后后面再根据这个临时表去查询你想要的结果;
      

  9.   

    如果用2个with 怎么用?with a as (select * from t_bus),
    with b as (select * from t_buss)select a.*,b.* from a,b;好像不行
      

  10.   

    with a as (select * from t_bus),
    b as (select * from t_buss)
    select a.*,b.* from a,b where ....