Viewing 10 posts - 1 through 10 (of 10 total)
Thanks for you response -- I agree with the "benefit" part, but would the be any downside that you can think of?
February 4, 2011 at 1:28 pm
Thank you, gents, for wonderful discussion here about my question. I voted on Hugo's suggested as well. Coming from Oracle shop, this behavior was a surprise to me. So I...
December 2, 2010 at 10:41 am
Where is CHAR datatype? 🙂
October 18, 2010 at 12:06 pm
In SQL in Oracle they will be treated is null, but not in PL/SQL:
DECLARE
col1 CHAR(1);
BEGIN
col1 := '';
DBMS_OUTPUT.PUT_LINE('Length :'||TO_CHAR(LENGTH(col1)));
IF (col1 IS NULL)...
October 18, 2010 at 11:30 am
I think you misunderstood my point. You CAN select null from CHAR column:
SQL> create table chr(x char(1));
Table created.
SQL> insert into chr values(null);
1 row created.
SQL> insert into chr values(null);
1 row created.
SQL>...
October 18, 2010 at 10:35 am
No, I don't think so... Char data type is also a string data type, and person posting original question was looking for a way to distinguish between NULL and empty...
October 18, 2010 at 10:10 am
If you define that variable as char(1) or char(20) instead of varchar2, you will see that it won't be treated as null. That's what I was trying to specify...
October 18, 2010 at 8:59 am
And ' ' is no longer treated as NULL...
October 15, 2010 at 1:20 pm
I would add that it depends on how you define your string. If column is defined as varchar2(1) then empty string will be treated as NULL in Oracle. However, if...
October 15, 2010 at 1:19 pm
I would add that you can also insert duplicate into identity by reseeding IDENTITY.
dbcc checkident(table_name,reseed,0)
and it will start from beginning again, unless as mentioned above you have unique key on...
October 5, 2010 at 11:40 am
Viewing 10 posts - 1 through 10 (of 10 total)