Search Postgresql Archives

Re: postgresql vs mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Does PostgreSQL suffer from this oddity as well? This distinction
> between an empty string and a NULL? Could you also please give me an
> example of where this would be useful from a business logic
> standpoint? Why should a NULL be different from an empty string,
> what's the big mysterious difference?


Nulls are also useful for data that is imported where there is not always a way to determine
certain field values for a record.

Now suppose in a query you want to return all record that meet your criteria as well as any that
might meet your criteria depending if the null value was actually known.

Select * from table
Where ((field1,field2,field3) = ('farmer','baker','shoemaker')) is unknown;

Now you can get all records that may meet your criteria.

Regards,
Richard Broersma Jr.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux