一个 sql 逻辑运算的问题(pl/sql中的写法)

jumpding 2003-09-22 04:59:28
select * from a where b与1>0

请问这样的语句在pl/sql中的应该怎么写,请高手赐教!
...全文
60 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
skyxj 2003-09-23
  • 打赏
  • 举报
回复
sql 逻辑运算的问题
select * from a where b与1>0

分成
select * from a where b>0 and 1>0
不行么?
beckhambobo 2003-09-22
  • 打赏
  • 举报
回复
UTL_RAW.BIT_AND (
r1 IN RAW,
r2 IN RAW)
RETURN RAW;

select utl_raw.bit_and('0000','1111') from dual;
jiezhi 2003-09-22
  • 打赏
  • 举报
回复
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
...
jiezhi 2003-09-22
  • 打赏
  • 举报
回复
bit_and()
bzszp 2003-09-22
  • 打赏
  • 举报
回复
按位与?
不知道有没有这种操作符或函数,没见过

3,499

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧