0

0

【MySQL 00】MySQL数据表

黄舟

黄舟

发布时间:2017-02-04 11:32:55

|

1258人浏览过

|

来源于php中文网

原创

 

【MySQL 00】MySQL数据表

/*
 *-------------------------------------------------MySQL数据表---------------------------------------------------
     *
     *
        C:\Users\kevinelstri>mysql -u root -p
        Enter password: *****
        Welcome to the MySQL monitor.  Commands end with ; or \g.
        Your MySQL connection id is 118
        Server version: 5.5.29 MySQL Community Server (GPL)

        Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

        Oracle is a registered trademark of Oracle Corporation and/or its
        affiliates. Other names may be trademarks of their respective
        owners.

        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

        mysql> show databases;
        +--------------------+
        | Database           |
        +--------------------+
        | information_schema |
        | data1              |
        | data2              |
        | mysql              |
        | performance_schema |
        | test               |
        +--------------------+
        6 rows in set (0.00 sec)

        mysql> use test;
        Database changed
        mysql> show tables;
        +----------------+
        | Tables_in_test |
        +----------------+
        | access         |
        | app            |
        | cal            |
        | orders         |
        | person         |
        | person01       |
        | web            |
        | website        |
        +----------------+
        10 rows in set (0.00 sec)

        mysql> select * from access;
        +------+---------+-------+------------+
        | aid  | site_id | count | date       |
        +------+---------+-------+------------+
        |    1 |       1 |    45 | 2016-05-10 |
        |    2 |       3 |   100 | 2016-05-13 |
        |    3 |       1 |   230 | 2016-05-14 |
        |    4 |       2 |    10 | 2016-05-14 |
        |    5 |       5 |   206 | 2016-05-14 |
        |    6 |       4 |    13 | 2016-05-15 |
        |    7 |       3 |   220 | 2016-05-16 |
        |    8 |       5 |   545 | 2016-05-16 |
        |    9 |       3 |   201 | 2016-05-17 |
        +------+---------+-------+------------+
        9 rows in set (0.00 sec)

        mysql> select * from app;
        +------+------------+-----------------------+---------+
        | id   | app_name   | url                   | country |
        +------+------------+-----------------------+---------+
        |    1 | qq         | http://www.qq.com     | CN      |
        |    2 | taobao app | http://www.taobao.com | CN      |
        |    3 | weibo app  | http://weibo.com      | CN      |
        +------+------------+-----------------------+---------+
        3 rows in set (0.00 sec)

        mysql> select * from cal;
        +----+------+-------+--------+------+
        | id | name | first | second | sum  |
        +----+------+-------+--------+------+
        |  1 | lily |    42 |      3 | NULL |
        |  2 | mary |    22 |    637 | NULL |
        |  3 | may  |    32 |     43 |   75 |
        +----+------+-------+--------+------+
        3 rows in set (0.00 sec)

        mysql> select * from orders;
        +------+---------+------+
        | O_id | OrderNo | id   |
        +------+---------+------+
        |    1 |   77895 |    3 |
        |    2 |   44678 |    3 |
        |    3 |   22456 |    2 |
        |    4 |   24562 |    1 |
        +------+---------+------+
        4 rows in set (0.00 sec)

        mysql> select * from person;
        +----+-----------+-----------+--------------+----------+
        | id | LastName  | FirstName | Address      | City     |
        +----+-----------+-----------+--------------+----------+
        |  1 | Hansen    | Ola       | Timoteivn 10 | Sandes   |
        |  2 | Svendson  | Tove      | Borgvn 23    | Sandes   |
        |  3 | Pettersen | Keri      | Storgt 20    | Stavaner |
        +----+-----------+-----------+--------------+----------+
        3 rows in set (0.00 sec)

        mysql> select * from website;
        +----+----------+-------------------------+-------+---------+
        | id | name     | url                     | alexa | country |
        +----+----------+-------------------------+-------+---------+
        |  1 | Google   | http://www.google.com   |     1 | USA     |
        |  2 | taobao   | http://www.taobao.com   |    13 | CN      |
        |  3 | cainiao  | http://www.runoob.com   |   673 | CN      |
        |  4 | weibo    | http://weibo.com        |    20 | CN      |
        |  5 | Facebook | http://www.facebook.com |     3 | USA     |
        |  7 | ali      | http://www.ali.com      |    32 | CN      |
        +----+----------+-------------------------+-------+---------+
        6 rows in set (0.00 sec)

        mysql> select * from person01;
        +------+------+---------+----------+------------+
        | id   | name | address | city     | date       |
        +------+------+---------+----------+------------+
        |    1 | Lily | xian    | shanghai | NULL       |
        |    2 | Mary | beijing | shanghai | 2016-03-02 |
        +------+------+---------+----------+------------+
        2 rows in set (0.00 sec)

     *
     */

以上就是 【MySQL 00】MySQL数据表的内容,更多相关内容请关注PHP中文网(www.php.cn)!

同徽B2C电子商务软件系统
同徽B2C电子商务软件系统

开发语言:java,支持数据库:Mysql 5,系统架构:J2EE,操作系统:linux/Windows1. 引言 32. 系统的结构 32.1 系统概述 33. 功能模块设计说明 43.1 商品管理 43.1.1 添加商品功能模块 53.1.2 商品列表功能模块 83.1.3 商品关联功能模块 93.

下载

相关专题

更多
php远程文件教程合集
php远程文件教程合集

本专题整合了php远程文件相关教程,阅读专题下面的文章了解更多详细内容。

21

2026.01.22

PHP后端开发相关内容汇总
PHP后端开发相关内容汇总

本专题整合了PHP后端开发相关内容,阅读专题下面的文章了解更多详细内容。

14

2026.01.22

php会话教程合集
php会话教程合集

本专题整合了php会话教程相关合集,阅读专题下面的文章了解更多详细内容。

8

2026.01.22

宝塔PHP8.4相关教程汇总
宝塔PHP8.4相关教程汇总

本专题整合了宝塔PHP8.4相关教程,阅读专题下面的文章了解更多详细内容。

7

2026.01.22

PHP特殊符号教程合集
PHP特殊符号教程合集

本专题整合了PHP特殊符号相关处理方法,阅读专题下面的文章了解更多详细内容。

6

2026.01.22

PHP探针相关教程合集
PHP探针相关教程合集

本专题整合了PHP探针相关教程,阅读专题下面的文章了解更多详细内容。

6

2026.01.22

菜鸟裹裹入口以及教程汇总
菜鸟裹裹入口以及教程汇总

本专题整合了菜鸟裹裹入口地址及教程分享,阅读专题下面的文章了解更多详细内容。

20

2026.01.22

Golang 性能分析与pprof调优实战
Golang 性能分析与pprof调优实战

本专题系统讲解 Golang 应用的性能分析与调优方法,重点覆盖 pprof 的使用方式,包括 CPU、内存、阻塞与 goroutine 分析,火焰图解读,常见性能瓶颈定位思路,以及在真实项目中进行针对性优化的实践技巧。通过案例讲解,帮助开发者掌握 用数据驱动的方式持续提升 Go 程序性能与稳定性。

9

2026.01.22

html编辑相关教程合集
html编辑相关教程合集

本专题整合了html编辑相关教程合集,阅读专题下面的文章了解更多详细内容。

106

2026.01.21

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
MySQL 教程
MySQL 教程

共48课时 | 1.9万人学习

MySQL 初学入门(mosh老师)
MySQL 初学入门(mosh老师)

共3课时 | 0.3万人学习

简单聊聊mysql8与网络通信
简单聊聊mysql8与网络通信

共1课时 | 805人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号