Re: [SQL] CREATE TABLE

From: David Martinez Cuevas <david(at)estadistica(dot)unam(dot)mx>
To: Ingrith Andrea Correa Vargas <i-correa(at)uniandes(dot)edu(dot)co>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] CREATE TABLE
Date: 1999-02-26 20:51:56
Message-ID: Pine.LNX.4.04.9902261440390.11046-100000@mail.estadistica.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 "
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

In response to

  • CREATE TABLE at 1999-02-25 18:56:07 from Ingrith Andrea Correa Vargas

Browse pgsql-sql by date

  From Date Subject
Next Message Christophe Labouisse 1999-02-26 22:45:00 Re: [SQL] Unique Number KEY
Previous Message Jackson, DeJuan 1999-02-26 18:34:19 RE: [SQL] Unique Number KEY