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

Поиск
Список
Период
Сортировка
От mdr
Тема Re: Creating Primary Key after CREATE TABLE: Is Sequence created?
Дата
Msg-id 1380310852363-5772642.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (Elliot <yields.falsehood@gmail.com>)
Ответы Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (John R Pierce <pierce@hogranch.com>)
Re: Creating Primary Key after CREATE TABLE: Is Sequence created?  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Elliot
Дата:
Сообщение: Re: Creating Primary Key after CREATE TABLE: Is Sequence created?
Следующее
От: Monosij
Дата:
Сообщение: Re: Trying to create DB / user to import some data