What's the meaning of '-' in oracle output?
Sometimes I get a dash in output but I was told it's not a null, so what is it?
select title, order#, STATE from customers C, ORDERITEMS O, books b where b.ISBN=O.ISBN (+) order by title
CUSTOMERS: Column Name Data Type Nullable Default Primary Key CUSTOMER# N开发者_StackOverflow社区UMBER(4,0) No - 1 LASTNAME VARCHAR2(10) Yes - - FIRSTNAME VARCHAR2(10) Yes - - ADDRESS VARCHAR2(20) Yes - - CITY VARCHAR2(12) Yes - - STATE VARCHAR2(2) Yes - - ZIP VARCHAR2(5) Yes - - REFERRED NUMBER(4,0) Yes - -
if you select '-' from dual, the output will be "-".
If this is not the answer you are looking for, consider posting your query and maybe the DDL of the table in question.
I agree with user490735, it looks like his link has the answer. Also, ANSI join syntax is mucn easier (at least for me) to read.
The dash appears to be a place holder for null columns in the outer join. As a long shot, if the default value of the nullable columns is actually '-' (I don't think it is) then you will get the dash in your query results.
It looks like you posted the output of a "describe," not the output of the query. The describe is simply telling you there is no default value for any of the columns and which columns are not part of the primary key.
精彩评论