select * from a where b与1>0 请问这样的语句在pl/sql中的应该怎么写,请高手赐教!

解决方案 »

  1.   

    sorry:
    bitand()SELECT order_id, customer_id,
    DECODE(BITAND(order_status, 1), 1, 'Warehouse', 'PostOffice')
    Location,
    DECODE(BITAND(order_status, 2), 2, 'Ground', 'Air') Method,
    DECODE(BITAND(order_status, 4), 4, 'Insured', 'Certified') Receipt
    FROM orders
    WHERE order_status < 8;
    ORDER_ID CUSTOMER_ID LOCATION MET RECEIPT
    ---------- ----------- ---------- --- ---------
    2458 101 Postoffice Air Certified
    2397 102 Warehouse Air Certified
    2454 103 Warehouse Air Certified
    2354 104 Postoffice Air Certified
    2358 105 Postoffice G Certified
    2381 106 Warehouse G Certified
    2440 107 Warehouse G Certified
    2357 108 Warehouse Air Insured
    2394 109 Warehouse Air Insured
    2435 144 Postoffice G Insured
    2455 145 Warehouse G Insured
    ...
      

  2.   

    UTL_RAW.BIT_AND (
       r1 IN RAW,
       r2 IN RAW) 
      RETURN RAW;select utl_raw.bit_and('0000','1111') from dual;
      

  3.   

    sql 逻辑运算的问题
    select * from a where b与1>0 分成
    select * from a where b>0 and 1>0 
    不行么?