Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. CREATE TABLE progress(
  2.  
  3. record_book numeric( 5 ) NOT NULL,
  4.  
  5. subject text NOT NULL,
  6.  
  7. acad_year text NOT NULL,
  8.  
  9. term numeric( 1 ) NOT NULL CHECK ( term = 1 OR term = 2 ),
  10.  
  11. mark numeric( 1 ) NOT NULL CHECK ( mark >= 3 AND mark <= 5 ) DEFAULT 5,
  12.  
  13. FOREIGN KEY ( record_book ) REFERENCES students ( record_book )
  14.  
  15. ON DELETE CASCADE
  16.  
  17. ON UPDATE CASCADE
  18.  
  19. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement