![](https://seccdn.libravatar.org/avatar/6e6efed6db65218e904e06f0f2da58b5.jpg?s=120&d=mm&r=g)
Dear Scott... i tried like this but it didn't succeeded. kv=# alter table sales modify salesid serial; ERROR: syntax error at or near "modify" at character 19 kv=# alter table sales alter column salesid serial; ERROR: syntax error at or near "serial" at character 40 kv=# alter table sales alter column modify salesid serial; ERROR: syntax error at or near "salesid" at character 39 kv=# Please keep telling. Thank you very much in advance. --- "Wenzel, Scott" <scott_wenzel@BUDCO.com> wrote:
Not using postgres, but try
alter table sales modify salesid serial;
-----Original Message----- From: Prabu Subroto [mailto:prabu_subroto@yahoo.com] Sent: Tuesday, July 27, 2004 1:16 PM To: suse-programming-e@suse.com Subject: [suse-programming-e] altering a table to set serial function
Dear my friends...
I am using postgres 7.4 and SuSE 9.1.
I want to use auto_increment as on MySQL. I look up the documentation on www.postgres.com and I found "serial" .
But I don't know how to create auto_increment. here is my try: " kv=# alter table sales alter column salesid int4 serial; ERROR: syntax error at or near "int4" at character 40 "
Please tell me the correct command to that.
Thank you very much in advance.
__________________________________ Do you Yahoo!? Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
__________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail