Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.28 KB  |  hits: 14  |  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. Trigger to prevent inserting 2 same values in one table
  2. CREATE TABLE Concert
  3. (  
  4.  ... (filled in with your existing table definition)
  5.  CONSTRAINT concert_place_unique UNIQUE (id_place, date)
  6. );
  7.        
  8. ALTER TABLE Concert
  9. add CONSTRAINT concert_place_unique UNIQUE (id_place, date);