Select statements on a table that has null fields

Поиск
Список
Период
Сортировка
От nathan
Тема Select statements on a table that has null fields
Дата
Msg-id 37E29F8F.4162E6EF@penguincomputing.com
обсуждение исходный текст
Список pgsql-sql
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



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Stephen Horton"
Дата:
Сообщение: Re: pgsql-sql-digest V1 #355 - unsubscribe please
Следующее
От: "Zot O'Connor"
Дата:
Сообщение: Converting an existing table?