SQL Language (MOSC)

MOSC Banner

Exists query

edited Oct 17, 2011 3:24AM in SQL Language (MOSC) 6 comments
Hi,

If anyone would know if below 2 queries are the same:

select * from test1 where exists (select 'X' from test2 where test1.col1=test2.col1);

select * from test1 where exists (select * from test2 where test1.col1=test2.col1);

The query different is with 'X' and * in the subquery? anyone know if both are the same? or any purpose why we are putting 'X' instead of * ?

Any input is greatly appreciated.

Thanks and best regards.

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