SHARE
TWEET

Untitled

a guest Jun 20th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE `questions` (
  2.   `question_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  3.   `category_id` int(5) unsigned NOT NULL,
  4.   `question` text NOT NULL,
  5.   PRIMARY KEY (`question_id`),
  6.   UNIQUE KEY `question_id` (`question_id`),
  7.   KEY `questions_ibfk_1` (`category_id`),
  8.   CONSTRAINT `questions_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`)
  9. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
  10.  
  11. CREATE TABLE `categories` (
  12.   `category_id` int(5) unsigned NOT NULL AUTO_INCREMENT,
  13.   `category` varchar(64) NOT NULL,
  14.   PRIMARY KEY (`category_id`),
  15.   UNIQUE KEY `category_id` (`category_id`),
  16. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top