Re: [SQL] Constraint problems

2002-09-27 Thread GB Clark
On Fri, 27 Sep 2002 11:29:34 -0700 (PDT) Stephan Szabo <[EMAIL PROTECTED]> wrote: > On Fri, 27 Sep 2002, GB Clark wrote: > > > CREATE TABLE sysusers ( > > user_id INTEGER DEFAULT nextval('sysusers_user_id_seq') > >

[SQL] Constraint problems

2002-09-27 Thread GB Clark
ysusers ADD CONSTRAINT createby_test CHECK (createby in (username)); INSERT INTO sysusers (username, password) VALUES ('gclarkii', 'testing'); --SNIP-- It is the constraint on createby that I'm trying to get to work. Thanks for any and all help. GB -- GB Clark II

Re: [SQL] Retrieving the new nextval...

2002-09-02 Thread GB Clark
d create a function which takes the > > insert statement, and > > ends with doing a select on the currval (as above) > > and returning that. > > As I do the 2 statement approach above, I haven't > > done a function, but > > it doesn't look like it wou

Re: [SQL] Retrieving the new "nextval" for primary keys....

2002-09-02 Thread GB Clark
n call currval() to get the current serial number for the connection. GB -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? ---(end of broadcast)--