• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Mysql > 【MySQL 00】MySQL数据表

【MySQL 00】MySQL数据表

作者:匿名 字体:[增加 减小] 来源:互联网 时间:2018-12-05

匿名通过本文主要向大家介绍了MySQL,数据表等相关知识,希望本文的分享对您有所帮助
【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数据表的内容,更多相关内容请关注微课江湖()!

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 分享下mysql各个主要版本之间的差异
  • MySQL essential版本和普通版本有什么区别?
  • redhat 5.4下安装MYSQL全过程
  • 如何用SQL命令查看Mysql数据库大小
  • 解析mysql中如何获得数据库的大小
  • 解析mysql修改为utf8后仍然有乱码的问题
  • 5个常用的MySQL数据库管理工具详细介绍
  • 解析在MySQL里创建外键时ERROR 1005的解决办法
  • 解析远程连接管理其他机器上的MYSQL数据库
  • mysql 精简过程(删除一些文件)

相关文章

  • 2018-12-05 MySQL之——提示"mysql deamon failed to start"错误的解决方法
  • 2017-05-11MySQL order by性能优化方法实例
  • 2018-12-05MSSQL2005 INSERT,UPDATE,DELETE 之OUTPUT子句使用实例
  • 2018-12-05MySQL 8.0.2复制新特性的详细介绍
  • 2018-12-05使用mysql_query()函数执行SQL语句(PHP操作MySQL数据库的方法三)
  • 2018-12-05sql server:alter database name的问题
  • 2017-05-11新建一个MySQL数据库的简单教程
  • 2017-05-11MYSQL命令行导入导出数据库详解
  • 2018-12-05通过SQL Server的位运算功能巧妙解决多选查询方法
  • 2018-12-05Sqlserver 2000/2005/2008 的收缩日志方法和清理日志方法

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • 实例详解2017最新版windows安装mysql教程
    • 30 个优化 MySQL 语句的技巧
    • SqlServer下通过XML拆分字符串的方法
    • MySQL 教程之数据库
    • mysql cast与convert 函数的用法
    • mysql解决远程不能访问的二种方法
    • MySQL教程--通过配置文件连接数据库操作详解
    • 详解Mysql 事务及数据的一致性处理
    • MySQL计划任务(事件调度器) Event Scheduler介绍
    • SQL2005 性能监视器计数器错误解决方法

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有