• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

【MySQL 00】MySQL数据表

mysql 搞代码 4年前 (2022-01-09) 26次浏览 已收录 0个评论

【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_<em style="color:transparent">本文来源gao.dai.ma.com搞@代*码#网</em>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数据表的内容,更多相关内容请关注搞代码(www.gaodaima.com)!


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:【MySQL 00】MySQL数据表
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址