In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "Mysql basic Grammar arrangement". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "Mysql basic Grammar arrangement".
1. Basic grammar
Show databases (); displays the current database
Show user (); shows the current user
Show now (); shows the current time
Use database name; select database
Show tables; displays all tables of the selected data
Show create table users\ G; displays the detailed data of the table structure
DESCribe table name; shows the table structure. Uppercase can be completed automatically.
Select * from users; queries all data
Select id,name from users; query two-column table
Select * from users where id='2'; indicates the field name without quotation marks and the field content with quotation marks
Limit 3 restricts the display of 3 lines
Select DISTINCT table name to repeat the name
Select database () displays the current database
Select version displays the database version
Select user () displays the current user
II. Add, delete, modify and check
Select column name from table name where field 1 'condition 1' and field 2 'condition 2'
Insert into table name (column 1, column 2.) Values (value 1, value 2)
Update table name set column name = new value where column name = some value
Delete from table name where column name = value
III. Notes
-- spaces
#
/ * /
Fourth, the features of mysql5.0 and above:
Define information_schema database by default, with table schemata (database name), tables (table name), columns (column name or field name)
In the schemata table, the schema_name field is used to store the database name
In the tables table, table_schema and table_name are used to store the database name, respectively.
In the columns table, tabel_schema stores the database name, table_name storage table name, and column_name storage field name
Thank you for your reading, the above is the content of "Mysql basic Grammar arrangement". After the study of this article, I believe you have a deeper understanding of the problem of Mysql basic Grammar arrangement, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.