Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement