Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.37 KB | None | 0 0
  1. DROP TABLE IF EXISTS posts;
  2. CREATE TABLE posts (
  3.   id INTEGER PRIMARY KEY autoincrement,
  4.   title string NOT NULL,
  5.   name string NOT NULL,
  6.   text string NOT NULL
  7. );
  8.  
  9. DROP TABLE IF EXISTS replies;
  10. CREATE TABLE replies (
  11.     replyid INTEGER PRIMARY KEY autoincrement,
  12.     OPid INTEGER
  13.     name string NOT NULL,
  14.     text string NOT NULL,
  15.     FOREIGN KEY(OPid) REFERENCES posts(id)
  16. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement