Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 25th, 2011  |  syntax: SQL  |  size: 0.60 KB  |  views: 97  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CREATE TABLE telekanal
  2. (
  3.   kirjeldus CHARACTER VARYING(255),
  4.   nimetus CHARACTER VARYING(255),
  5.   t_id serial NOT NULL,
  6.   CONSTRAINT primary_id PRIMARY KEY (t_id)
  7. )
  8.  
  9. CREATE TABLE programm
  10. (
  11.   algusaeg TIMESTAMP WITHOUT TIME zone,
  12.   kirjeldus CHARACTER VARYING(255),
  13.   nimetus CHARACTER VARYING(255),
  14.   pikkus INTEGER,
  15.   tyyp CHARACTER VARYING(255),
  16.   telekanal BIGINT NOT NULL,
  17.   p_id serial NOT NULL,
  18.   CONSTRAINT primary_programmid PRIMARY KEY (p_id),
  19.   CONSTRAINT fk_telekanal FOREIGN KEY (telekanal)
  20.       REFERENCES telekanal (t_id) MATCH SIMPLE
  21.       ON UPDATE NO ACTION ON DELETE NO ACTION
  22. )
clone this paste RAW Paste Data