Re: [SQL] CREATE TABLE

Поиск
Список
Период
Сортировка
От David Martinez Cuevas
Тема Re: [SQL] CREATE TABLE
Дата
Msg-id Pine.LNX.4.04.9902261440390.11046-100000@mail.estadistica.unam.mx
обсуждение исходный текст
Ответ на CREATE TABLE  (Ingrith Andrea Correa Vargas <i-correa@uniandes.edu.co>)
Список pgsql-sql
On Thu, 25 Feb 1999, Ingrith Andrea Correa Vargas wrote:

>
> Hello!

Hola Ingrith

>
> I have a question:
>
> I want to create a table with a column wich will have a DEFAULT
> user-function value.
> Can you write an example, with the right syntax?!
>
> I have been making some examples, but I always have a syntax error that I
> can't solve.
>
> Thank you in advance, and I'll be waiting for a response!

This an example of what you want
create sequence seq_master;
create table master ( id int default (nextval('seq_master')));

Obviously, 'nextval' is not a user defined function, but i guess you can
use one of yours.

NOTICE: I'm using PGSQL 6.3-2

Suerte.


David Martinez Cuevas
     Office 622-60-72      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
     Home 565-25-17          "Eat Linux, Drink Linux...  SMOKE LINUX "
                           @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@




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

Предыдущее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [SQL] Unique Number KEY
Следующее
От: Christophe Labouisse
Дата:
Сообщение: Re: [SQL] Unique Number KEY