In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Today, I would like to talk to you about what the commonly used MySQL commands are, many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
MySQL command line is the knowledge that must be mastered to learn MySQL database. I have introduced 10 useful MySQL command lines for you, hoping to help you learn MySQL command lines.
1. Display the structure of the data table:
Mysql > DESCRIBE table name; (DESC table name)
2. Establish a data sheet:
Mysql > USE library name; / / enter the database
Mysql > CREATE TABLE table name (field name VARCHAR (20), field name CHAR (1))
3. Delete the data table:
Mysql > DROP TABLE table name
4. Rename the data table
Alter table t1 rename t2
5. Display the records in the table:
Mysql > SELECT * FROM table name
6. Insert a record into the table:
Mysql > INSERT INTO table name VALUES ("hyq", "M")
7. Update data in the table:
Mysql- > UPDATE table name SET field name 1 roomrooma name, field name 2 roomb' WHERE field name 3roomroomc'
8. Empty the records in the table:
Mysql > DELETE FROM table name
9. Load the data into the data table in text:
Mysql > LOAD DATA LOCAL INFILE "D:/mysql.txt" INTO TABLE table name
10. display the definition of the table, and you can also see the constraints of the table, such as foreign keys
After reading the above, do you have any further understanding of the commonly used MySQL commands? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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: 225
*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.