Home » SQL & PL/SQL » SQL & PL/SQL » CHAR and VARCHAR2 (Oracle9i)
CHAR and VARCHAR2 [message #399556] Thu, 23 April 2009 00:17 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
SQL> SELECT * FROM A;

NAME Here NAME is CHAR data type column.
----------
RAM
RAMESH

SQL> SELECT * FROM B;

NAME Here NAME is VARCHAR2 data type column.
----------
RAM
RAMESH

SQL> SELECT A.NAME,B.NAME
2 FROM A,B
3 WHERE A.NAME=B.NAME;

no rows selected


Why it's returning no rows.
Re: CHAR and VARCHAR2 [message #399563 is a reply to message #399556] Thu, 23 April 2009 00:45 Go to previous message
Michel Cadot
Messages: 64119
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Why it's returning no rows.

What does the documentation says about these 2 datatypes?

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: how to switch between oracle 10g & 11g on the same PC
Next Topic: partition by rownum - clarify
Goto Forum:
  


Current Time: Tue Dec 06 08:12:45 CST 2016

Total time taken to generate the page: 0.13647 seconds