Guest User

Untitled

a guest
Feb 20th, 2018
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. mysql> CREATE TABLE `message_folders` (
  2. -> `id` int(11) NOT NULL auto_increment,
  3. -> `name` varchar(255) NOT NULL,
  4. -> `created_at` datetime NOT NULL,
  5. -> PRIMARY KEY (`id`)
  6. -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  7. ERROR 1050 (42S01): Table 'message_folders' already exists
  8. mysql> describe message_folders;
  9. +------------+--------------+------+-----+---------------------+----------------+
  10. | Field | Type | Null | Key | Default | Extra |
  11. +------------+--------------+------+-----+---------------------+----------------+
  12. | id | int(11) | | PRI | NULL | auto_increment |
  13. | name | varchar(255) | | | | |
  14. | created_at | datetime | | | 0000-00-00 00:00:00 | |
  15. +------------+--------------+------+-----+---------------------+----------------+
  16. 3 rows in set (0.00 sec)
  17.  
  18. mysql> insert into message_folders (id, name, created_at) values (1, null, null);
  19. ERROR 1048 (23000): Column 'name' cannot be null
  20. mysql> insert into message_folders (id) values (1);
  21. Query OK, 1 row affected (0.07 sec)
Add Comment
Please, Sign In to add comment