Created
August 2, 2012 10:05
-
-
Save snickerjp/3236053 to your computer and use it in GitHub Desktop.
SQL関連
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select DATA_FLGS,decode(bitand(DATA_FLGS,16),16,'○','×') from DATA where ID='1' ; | |
| DATA_FLGS DE | |
| --------------- -- | |
| 16644 × | |
| select DATA_FLGS,decode(bitand(DATA_FLGS,16),16,'○','×') from DATA where ID='2' ; | |
| DATA_FLGS DE | |
| --------------- -- | |
| 24605 ○ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL> select DATA_FLGS,bitand(DATA_FLGS,16) from DATA where ID='1' ; | |
| DATA_FLGS BITAND(DATA_FLGS,16) | |
| --------------- -------------------------- | |
| 16644 0 | |
| SQL> select DATA_FLGS,bitand(DATA_FLGS,16) from DATA where ID='2' ; | |
| DATA_FLGS BITAND(DATA_FLGS,16) | |
| --------------- -------------------------- | |
| 24605 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select DATA_FLGS,bitand(DATA_FLGS,POWER(2, (5 - 1))) from DATA where ID='2' ; | |
| DATA_FLGS BITAND(DATA_FLGS,POWER(2, (5 - 1))) | |
| --------------- -------------------------- | |
| 24605 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SQL> select DATA_FLGS from DATA; | |
| ID DATA_FLGS | |
| ----------- --------------- | |
| 1 16644 | |
| 2 24605 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment