Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
66
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 `my_table` (
  2. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  3. `ref_a_id` int(10) unsigned NOT NULL,
  4. `ref_b_id` int(10) unsigned NOT NULL,
  5. `is_active` tinyint(1) DEFAULT '1',
  6. PRIMARY KEY (`id`),
  7. UNIQUE KEY `index_my_table_on_ref_a_ref_b_is_active` (`ref_a_id`, `ref_b_id`, `is_active`)
  8. ) ENGINE=InnoDB AUTO_INCREMENT=2818259 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement