Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > alter table
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 3064 of 3160
Post > Topic >>

alter table

by srb@[EMAIL PROTECTED] (Pavel SRB) Apr 7, 2008 at 10:53 PM

hi all

please i have one question. I made table called tab_article with

CREATE TABLE "tab_article" (
    "id" serial NOT NULL PRIMARY KEY,
    "flag" boolean NOT NULL,
    "title" text NOT NULL,
    "journal" integer NOT NULL,
    "doi" varchar(255) NOT NULL,
    "year" integer NOT NULL,
    "volume" integer NOT NULL,
    "issue" integer NOT NULL,
    "pages_start" integer NOT NULL,
    "pages_end" integer NOT NULL,
    "printed" boolean NOT NULL,
    "public" boolean NOT NULL,
    "entry" boolean NOT NULL,
    "filename" integer NOT NULL,
    "language" integer NOT NULL,
    "link" integer NOT NULL,
    "info" varchar(255) NOT NULL
);

and later another table called tab_journal

CREATE TABLE "tab_journal" (
    "id" serial NOT NULL PRIMARY KEY,
    "flag" boolean NOT NULL,
    "name" text NOT NULL,
    "publisher" integer NOT NULL,
    "issn_print" integer NOT NULL,
    "issn_online" integer NOT NULL,
    "link" integer NOT NULL,
    "date_range" varchar(255) NOT NULL
);

and i needed to change column journal in tab_article to be set like
"journal_id" integer NOT NULL REFERENCES "article_journal" ("id")

and i am not able to find the right alter table command.
thank you very much

pavel




-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 5 Posts in Topic:
alter table
srb@[EMAIL PROTECTED] (P  2008-04-07 22:53:20 
Re: alter table
sdavis2@[EMAIL PROTECTED]  2008-04-07 17:08:19 
Re: alter table
srb@[EMAIL PROTECTED] (P  2008-04-07 23:18:38 
Re: alter table
sdavis2@[EMAIL PROTECTED]  2008-04-07 17:28:23 
Re: alter table
srb@[EMAIL PROTECTED] (P  2008-04-08 06:32:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 18:44:26 CDT 2008.