Created
March 9, 2015 18:06
-
-
Save developerworks/aa5b47a0d6355fbf91af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> show create database usersystem; | |
+------------+---------------------------------------------------------------------+ | |
| Database | Create Database | | |
+------------+---------------------------------------------------------------------+ | |
| usersystem | CREATE DATABASE `usersystem` /*!40100 DEFAULT CHARACTER SET utf8 */ | | |
+------------+---------------------------------------------------------------------+ | |
1 row in set (0.00 sec) | |
mysql> show create table user; | |
ERROR 1046 (3D000): No database selected | |
mysql> use usersystem; | |
Reading table information for completion of table and column names | |
You can turn off this feature to get a quicker startup with -A | |
Database changed | |
mysql> show create table user; | |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| Table | Create Table | | |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| user | CREATE TABLE `user` ( | |
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(16) DEFAULT NULL, | |
`last_name` varchar(16) DEFAULT NULL, | |
`email` varchar(64) DEFAULT NULL, | |
`inserted_at` datetime NOT NULL, | |
`updated_at` datetime NOT NULL, | |
`username` varchar(32) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `id` (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 | | |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
1 row in set (0.01 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment