RE: SQL Select statement
"David, Romeo B. (Govt)" <[email protected]> Thu, 30 Jan 2003 09:19:10 -0500
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-854653-2003.01.30-14.19.48--gcdod-oracle#[email protected]> |
Why would you want a field which is null returned if you are looking for one that is like something like 'SMI%'. But if you insist. You can use something like select nvl(ename,'SMITH') from emp where ename like 'SMI%'; this way anyone record with a null value in ename will be treated as SMITH and you also get them. -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Wednesday, January 29, 2003 4:35 AM To: Oracle Subject: [oracle] SQL Select statement Hi, I am new to Oracle database. There are a few things that I need help. 1) As we know, the LIKE operator in SQL statement will not return the field which is NULL. So, what can we do in order for the field which is NULL to be return? 2) In SQL Server, it is possible to select a column using another SQL statement. Eg. select abc, (select sum(def) from B), ...... I tested using Oracle SQLPlus, and keep getting the error message missing expression. How to accomplish this in Oracle? 3) What is the best reference to look for to get started with Oracle database? Eg, how do we know what features are available in Oracle and how to use it (syntax). Thank you in advance for the help. Best Regards, - nicole - --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to %%email.unsub%%. --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to [email protected].