| От | Ken Godee |
|---|---|
| Тема | Re: what is null |
| Дата | |
| Msg-id | 3F2E68D8.24045.1BC331@localhost обсуждение исходный текст |
| Ответ на | what is null (John Harrold <jmh17@pitt.edu>) |
| Список | pgsql-general |
> i'm trying to alter a table call it 'my_table' and i'm trying to set the > field 'my_id' to prevent null values from being inserted. when i run the > following: > > ALTER TABLE my_table ALTER my_id SET NOT NULL; > > i get: > > ERROR: ALTER TABLE: Attribute "my_id" contains NULL values > > so i want to find out which rows have null values so i run: > > my=# select my_id from my_table where my_id=NULL; > my_id > --------- > (0 rows) > > > so this would indicate to me that there are no rows in which my_id is NULL. > so what is preventing me from altering the table? or am i just doing > something wrong? > John, Try "my_id is null" instead of "my_id=NULL"
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера