Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2016
    Posts
    18
    Provided Answers: 1

    Unanswered: In add column to add a new column before some column ?

    Hello,
    adding new fields to the postgresql tables using
    Code:
    alter table ...  add column...
    syntax the new column is added to the end of the table. I did not find in the syntax possibilty to add a new column before some column ?

    Are there some utilities to do this, not manually?

    Thanks!

  2. #2
    Join Date
    Nov 2003
    Posts
    2,993
    Provided Answers: 23
    [QUOTE=mstdmstd;6649721I did not find in the syntax possibilty to add a new column before some column ?[/quote]No there is no such feature. And it's really not needed. The order of columns in a table is meaningless. you can always re-order them through a view or simply in the query you are using.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •