博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
查看mysql数据库和表的创建语句
阅读量:7298 次
发布时间:2019-06-30

本文共 2251 字,大约阅读时间需要 7 分钟。

hot3.png

分别是:

show create database dbname;show create table tbname;

示例:

zsh >> mysql -u root -p                                  Enter password: Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 329Server version: 5.5.34-0ubuntu0.13.04.1 (Ubuntu)Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show create database test;+----------+---------------------------------------------------------------+| Database | Create Database                                               |+----------+---------------------------------------------------------------+| test     | CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET utf8 */ |+----------+---------------------------------------------------------------+1 row in set (0.00 sec)mysql> use testReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> show create table user;+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+| Table | Create Table                                                                                                                                                                                 |+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+| user  | CREATE TABLE `user` (  `id` int(11) NOT NULL AUTO_INCREMENT,  `name` text,  `email` varchar(1) DEFAULT NULL,  `password` text,  PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 |+-------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+1 row in set (0.00 sec)

转载于:https://my.oschina.net/letiantian/blog/191605

你可能感兴趣的文章
A和B两个数组,删除B中与A重复的元素
查看>>
方格广搜
查看>>
match
查看>>
今日工作情况2
查看>>
一个学习简单网络技术的网站
查看>>
使用JQuery的get或post方法时出现页面没法手动刷新?
查看>>
MongoDB进阶
查看>>
python3csv与xlsx文件操作模块(csv、xlsxwriter)
查看>>
开启线程方式
查看>>
xdebug
查看>>
Css之 间距初始化
查看>>
lsnrctl启动报错,Linux Error: 29: Illegal seek
查看>>
IDEA github
查看>>
linux 驱动学习笔记05--文件系统与设备文件系统
查看>>
unresolved external symbol __forceAtlDllManifest错误的解决
查看>>
Linux的.run文件简单制作
查看>>
ubuntu解压命令(转)
查看>>
C#获取获取北京时间多种方法
查看>>
动态语言的灵活性是把双刃剑 -- 以 Python 语言为例
查看>>
1. 字节序的转换
查看>>