Search Postgresql Archives

Re: Creating Primary Key after CREATE TABLE: Is Sequence created?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi David and John -

Thank you for your answers on the SERIAL, SEQUENCE and thus PRIMARY KEY.

I did not realize there was a column of type SERIAL that creates a SEQUENCE.

However, now I have a different question.

Is it possible to create a column of type SQL:2011 types (INTEGER or such)
and then connect a SEQUENCE to it and make that column a PRIMARY KEY -
without creating a column of type SERIAL?

It seems column of type SERIAL is specific to Postgres and will make my
script Postgres dependent?

Just in case I decide to go to MySQL. Most likely not, but just wanted to
manage to SQL:2011.

Thank you again.



--
View this message in context: http://postgresql.1045698.n5.nabble.com/Creating-Primary-Key-after-CREATE-TABLE-Is-Sequence-created-tp5772633p5772642.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux