Received: from symcom.com ([209.11.41.82]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2JHXdN01064 for ; Mon, 19 Mar 2001 12:33:39 -0500 (EST) (envelope-from pgsql@symcom.com) Message-Id: <200103191733.f2JHXdN01064@mail.postgresql.org> Received: from WorldClient [209.11.41.82] by symcom.com [209.11.41.82] with SMTP (MDaemon.v3.5.0.R) for ; Mon, 19 Mar 2001 12:41:29 -0500 Date: Mon, 19 Mar 2001 12:41:29 -0500 From: "postgresql" To: "PgSQL-SQL" Subject: serial type question X-Mailer: WorldClient Pro 2.2.1 X-MDRemoteIP: 209.11.41.82 X-Return-Path: pgsql@symcom.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org X-Archive-Number: 200103/362 X-Sequence-Number: 2026 I have a table that I want to add a serial type column. Is there a way to add it or do I have to create a new table and insert into it. I have experimented with: insert into newdb (name) select name from olddb order by jobno; however, pg does not allow the 'order by' during an insert/select I am on version 7.0.3 Maybe I don't need to do this. What I am trying to accomplish is to have PG create job numbers. Today, I only have 2 workstations that push jobs into the server and PG tracks the job number. However, I have been informed that in the next 6-8 months the number of job creation workstations will grow to 8 - 10. I would like to migrate to a job number created when the insert is done. Thanks for your help. Ted Petrosky