Home » SQL & PL/SQL » SQL & PL/SQL » Using % operator
Using % operator [message #248438] Fri, 29 June 2007 01:34 Go to next message
manchalravi
Messages: 15
Registered: June 2007
Junior Member
Hi,

I have issued following 2 queries but the result is not same.

EMP - Standard oracle given table.
1. select * from EMP;
>> It gives me 14 rows.
2. select * from EMP where MGR like '%';
>> Where as this gives me 13 rows, where the row with NULL in MGR column is ignored. Is the only '%' in LIKE clause means all values except NULL?

Please confirm.

Thanks,
Ravi



Re: Using % operator [message #248453 is a reply to message #248438] Fri, 29 June 2007 02:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
From SQL Reference, LIKE Condition:
Quote:
A percent sign (%) in the pattern can match zero or more characters (as opposed to bytes in a multibyte character set) in the value. The pattern '%' cannot match a null.

Regards
Michel
icon14.gif  Re: Using % operator [message #248462 is a reply to message #248453] Fri, 29 June 2007 02:15 Go to previous message
manchalravi
Messages: 15
Registered: June 2007
Junior Member
Thanks Michel!
Previous Topic: ROWID Storage in Oracle
Next Topic: How can I bifurcate result set into 2?
Goto Forum:
  


Current Time: Sun Dec 11 00:41:15 CST 2016

Total time taken to generate the page: 0.09119 seconds