[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: quote-space-quote -Reply
- Subject: Re: quote-space-quote -Reply
- From: the dragon <ceprn@HOTMAIL.COM>
- Date: Thu, 21 Oct 1999 08:34:18 CDT
To your example, I agree with you. On a global level, however, I disagree.
In most cases, it makes sense to have columns which are not null, if those
columns are 'key' fields which are likely to end up in a select where
clause. However, for those fields which are optional, in the database - as
in almost everywhere you'll find a space - then those columns will likely
not ever have a query written against them - such as a description column,
or an optional information column. And then, if you are going to have a
query against that column, it's very simple to use nvl(,) in the where
clause (or whatever lesser databases other than Oracle use :-) ).
The overhead and lost drive space associated with billions of spaces in the
database which could be null is plain idiotic.
clark
BTW, if the employee_tbl allowed nulls in the sales_type column, you could
easily modify the code to look like :
select name, deptid
from employee_tbl
where nvl(sales_type, 'Z') <> 'B'
----Original Message Follows----
>>> Keep in mind this **silliness** of every column being not null seems to
be PeopleSoft specific
It isn't silliness when you want to write a query using <>.
for example if sales type is null for non-sales employees, this query does
not return non-sales employees.
select name, deptid
from employee_tbl
where sales_type <> 'B'
not much fun having to put 'and not null' on bunches of queries.
jim
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com