From: | "Emils Klotins" <emils(at)mail(dot)grafton(dot)lv> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | default value syntax - pg compared to? |
Date: | 2001-03-07 10:01:30 |
Message-ID: | 3AA6231A.29527.13F907D2@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello,
do you happen to know, if there is any sqlserver that WON'T handle
inserting default value if it is not specified in the INSERT field list?
I am particularly interested in ORACLE, INFORMIX and MYSQL .
Eg.
CREATE TABLE test
(
id integer default 5,
fld1 text
);
INSERT INTO test (fld1) VALUES ('blahblah');
So, is there any sqlserver that under these conditions will NOT
make id = 5 for the inserted row?
Background:
There is a package called phprojekt where the developer has
created some workarounds for different handlings of auto-
incrementing fields (sequences) for the above databases.
The only place he uses them, however, is in the INSERT
stataments (and he does not need to know the new id value for the
inserted row).
So I suggested he rewrite INSERTs explicitly specifying field
names and excluding the id field, rather than putting a server-
specific "default value" token (which postgres does not support
anyway). Will it work for the above other dbs?
TIA for answers!
Emils
From | Date | Subject | |
---|---|---|---|
Next Message | Karel Zak | 2001-03-07 10:23:36 | Re: No Documentation for to_char(INTERVAL, mask) |
Previous Message | Richard Huxton | 2001-03-07 09:50:26 | Re: Problems with RULE |