Обсуждение: Select statements on a table that has null fields

Поиск
Список
Период
Сортировка

Select statements on a table that has null fields

От
nathan
Дата:
Question : Postgres 6.5.1 Linux Redhat 6.0

I have a table that has 6 columns, 3 of the columns have data in every
field but the last 3 columns have some data and some null fields. When I
do a select statement and query on the columns that have a null field I
crash the connection. Is this normal or is this a bug or am I doing
something wrong ?

Example:

create table sales_info (
   product_id int8   product_desc char(20),   in_stock int8,   //some fields will be null   on_shelf int8,   //some
fieldswill be null   total_sold int8   item_cost float8   )
 

select * from sales_info where in_stock >  3;

This will crash if the in_stock column has some rows with null values.


Nathan