In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "the summary of commonly used MySQL commands". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "commonly used MySQL command summary" bar!
Launch: net start mySql
Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName
List: show databases
Select database: use databaseName
List table: show tables
Display the properties of the table column: show columns from tableName
Set up the database: source fileName.txt
Matching characters: you can use the wildcard character _ to represent any character and% to represent any string
Add a field: alter table tabelName add column fieldName dateType
Add multiple fields: alter table tabelName add column fieldName1 dateType,add columns fieldName2 dateType
Multi-line command input: note that words cannot be disconnected; when inserting or changing data, the string of the field cannot be expanded into multiple lines, otherwise hard enter will be stored in the data
Add an administrator account: grant all on *. * to identified by "password"
Add a semicolon at the end of each statement after you have finished typing; or you can add g
Query time: select now ()
Query the current user: select user ()
Query database version: select version ()
Query the currently used database: select database ()
1. Delete the students table in the student_course database:
Rm-f student_course/students.*
2. Back up the database: (back up the database test)
Dump-u root-p test > c: est.txt
Backup table: (backup mytable table under test database)
Mysqldump-u root-p test mytable > c: est.txt
Import backup data into the database: (import back to test database)
Mysql-u root-p test
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.