Town Yard text:
The Confucian School of the practical and practical, line Buddhism Purdue sentient beings, the monastic Kangsheng fidelity, understanding of the easy to change the image. To science and technology to shine a good law, the achievement of a conscience blog.
______________________________________________________________________________________________________
Operating System:ubuntukylin 16.04 LTS 64bit
Mysql:ver 14.14 Distrib 5.7.17, for Linux (x86_64) using Editline Wrapper
Login:
Show all the databases:
Enter the specified database:
[email protected]:~$ mysql -u root -penter password: welcome to The mysql monitor. commands end with ; or \g.your mysql connection id is 14Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu) copyright (c) 2000, 2016, 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 databases;+--------------------+| database |+--------------------+| information_schema | | myfirstdb | | mysql | | performance_schema | | phpmyadmin | | sys |+--- -----------------+6 rows in set (0.00 sec) mysql> use myfirstdbreading table information for completion of table and column namesyou can turn off this feature to get a quicker startup With -adatabase changed
To view all tables under the current database:
View all the contents of the specified table:
Mysql> Show tables;+---------------------+| Tables_in_myfirstdb |+---------------------+| firsttable | | Personalinformation |+---------------------+2 rows in Set (0.00 sec) mysql> SELECT * FROM personalinformation;+------+ ---------------+| Nid | Name |+------+---------------+| 1 | Xinjinzhigang |+------+---------------+1 row in Set (0.00 sec)
Update a row of the specified data in a column in a table:
Code
mysql> Update personalinformation set name= ' Xinjinrushui ' where nid = 1; The name value of the row in the Personalinformation column =1 #更新 The table is changed to Xinjingrushui
Result
Query OK, 1 row affected (0.06 sec) Rows matched:1 changed:1 warnings:0
To view all the data in a table:
Exit:
Mysql> SELECT * FROM personalinformation;+------+--------------+| Nid | Name |+------+--------------+| 1 | Xinjinrushui |+------+--------------+1 row in Set (0.00 sec) mysql> Exitbye[email protected]:~$
______________________________________________________________________________________________________
If you think this blog post has a place to improve, please comment, I will think carefully.
Note: This blog post is only used for scientific research, if the infringement of your interests, please inform me, I will make the appropriate treatment.
This article is from the "calm mind like water, chi just like the pan." Blog, be sure to keep this source http://xinjingzhigang.blog.51cto.com/12262830/1904235
mysql5.7 a row of the specified data in a column in the Base Update table