Database Tuning (MOSC)

MOSC Banner

One quesion about a mathmatical trick in SQL

edited Nov 8, 2010 5:33AM in Database Tuning (MOSC) 6 commentsAnswered ✓
Hi All,

The SQL is:

SELECT chr(to_char(bitand(p1,-16777216))/16777215)||
         chr(to_char(bitand(p1, 16711680))/65535) "Lock",
         to_char( bitand(p1, 65535) )    "Mode"
    FROM v$session_wait
   WHERE event = 'enqueue'
  ;

It seems to seperate high ends and the lower ends of a number. I know a little about bitand, which dose  'bit and' operation. But I'm completely confused by the 'division sign'.

Could some help expound this to me, please?

Thank you very much.
Leon 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center