Received: from hotmail.com (law2-f89.hotmail.com [216.32.181.89]) by hub.org (8.9.3/8.9.3) with SMTP id LAA68258 for ; Fri, 5 Nov 1999 11:39:27 -0500 (EST) (envelope-from dziablo@hotmail.com) Received: (qmail 90356 invoked by uid 0); 5 Nov 1999 16:38:55 -0000 Message-ID: <19991105163855.90355.qmail@hotmail.com> Received: from 207.96.139.35 by www.hotmail.com with HTTP; Fri, 05 Nov 1999 08:38:55 PST X-Originating-IP: [207.96.139.35] From: "Frederic boucher" To: pgsql-sql@postgresql.org Subject: create table with default value... Date: Fri, 05 Nov 1999 08:38:55 PST Mime-Version: 1.0 Content-Type: text/plain; format=flowed Hi, I have a table with a Unique ID named U_ID that come from a sequence like that : create table the_table( U_ID integer default NEXTVAL('THE_SEQUENCE'), ... and I would like to have a field of type varchar that would be something like create table the_table( U_ID integer default NEXTVAL('THE_SEQUENCE'), name varchar(50) default 'NT_'+itoa(U_ID) ); so the field 'name' would be the string concatenation of "NT_" and the string value of the field U_ID. Is there a way to do this? Thanks for your precious help! ;) \fb ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com