Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f2CJt4x54495 for ; Mon, 12 Mar 2001 14:55:04 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from home.grafton.lv (home.grafton.lv [159.148.106.93]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f27A0cx49718 for ; Wed, 7 Mar 2001 05:00:39 -0500 (EST) (envelope-from emils@grafton.lv) Received: from mortyr (mortyr.grafton.lv [159.148.106.65]) by home.grafton.lv (8.9.3/8.8.7) with ESMTP id LAA06151 for ; Wed, 7 Mar 2001 11:59:49 -0200 From: "Emils Klotins" Organization: Grafton Entertainment To: pgsql-sql@postgresql.org Date: Wed, 7 Mar 2001 12:01:30 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: default value syntax - pg compared to? Message-ID: <3AA6231A.29527.13F907D2@localhost> X-mailer: Pegasus Mail for Win32 (v3.12c) X-Archive-Number: 200103/226 X-Sequence-Number: 1880 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