Re: "NOT NULL"
От | Jan B. |
---|---|
Тема | Re: "NOT NULL" |
Дата | |
Msg-id | 429307CB.3060100@monso.de обсуждение исходный текст |
Ответ на | Re: "NOT NULL" (tövis <tovises@freemail.hu>) |
Список | pgsql-novice |
If your RAD (I don't know what this means at all) does not allow the keyword "DEFAULT" you might probably use this: INSERT INTO some_table (second_field_name, third_field_name) VALUES (second_field_value, third_field_value); If you not mention first_field_name in the first parenthesis, the default value will be used. The reference for INSERT can give you further syntax details: http://www.postgresql.org/docs/8.0/interactive/sql-insert.html Jan Behrens tövis wrote: > Problem is evolving;o( > > When I'm using a sequence for table PRIMARY KEY, where I never ever > want to give a value myself to this field I've should provide DEFAULT > expression... > INSERT INTO some_table VALUES (DEFAULT,second_field,third_field,...); > But my lovely RAD (Clarion 6.1) does not allow this because of the > type is a LONG - INTEGER (4 byte). > I found a simple work around, define for RAD this value as STRING(16) > - and I can give value 'DEFAULT' - it is working. > Is there possibility to define for server that if it gets NULL or ZERO > value for this field use default value - next from sequence - which is > work well if you does not define "NOT NULL" or "PRIMARY KEY" > constraint for this field? > Thanks in advance > Tövis >
В списке pgsql-novice по дате отправления: