SQL BIT_OR()函數
BIT_OR(expression)
BIT_OR()函數返回表達式中所有的按位或。按位或函數的基本前提是,它返回0,如果相應的位匹配,1,如果他們不這樣做。該函數返回一個64位的整數,如果冇有匹配的行,則返回0。下麵的例子執行上的CARS表,由MAKER分組的PRICE列:
SQL> SELECT MAKER, BIT_OR(PRICE) BITS FROM CARS GROUP BY MAKER +---------------------------------------------------------+ |MAKER BITS | +---------------------------------------------------------+ |CHRYSLER 62293 | |FORD 16127 | |HONDA 32766 | +---------------------------------------------------------+ 1 row in set (0.00 sec)