Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default value giving me errors

Status
Not open for further replies.

keak

Programmer
Sep 12, 2005
247
0
0
CA
Hi there,
I have set the default value of my "corss_ref" table's "id" field to
Code:
nextval(('cross_ref_id_seq'::text)::regclass)

However, when I try to do an insert on this corss_reff table, its givning me the error, saying that relation cross_ref_id_seq doesn't exist.

Is there anything that I am doing wrong here?
I am trying to autoincrement this id field.....

Thanks!

 
and are you sure it really exists?

why don't you create it as SERIAL, thus it will create automaticly the sequence and the default value (or you are using old version)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top