In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly tells you about the simple steps to manipulate MySQL-2 data. You can look up the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on simple steps to manipulate MySQL-2 data can bring you some practical help.
# query
Select from table name
Example:
Select from students
# increase
Insert all columns: insert into table name values (...)
Example:
Insert into students values (0, "Huang Rong", "1990-01-01", 0meme0)
Default insert: insert into table name (column 1. Values (worth 1pm...)
Example:
Insert into students ("name", "gender") values ("Guo Jing" 1)
Insert multiple pieces of data at the same time: insert into table name values (...), (...).
Example:
Insert into students values (0, "Little Dragon Girl", "1992-02-03", 0meme0), (0, "Yang Guo", "1991-01-01", 1mem0)
Or the name of the insert into table (column 1.) Values (worth 1pm), (worth 1pm...)
Example:
Insert into students ("name", "gender") values ("Diao", 1), ("Guo Xiang", 0)
# Mysql can insert multiple pieces of data at the same time, which is unique to Mysql.
# modify
Update table name set column 1 = value 1 Personnal... Where condition
If no where condition is added, all columns are modified
Example:
Update students set birthday= 1980-02-01 "where name=" Guo Jing
# modify multiple values:
Update students set name= "Ronger" birthday= "1988-01-01" where name= "Huang Rong"
# Delete
# physical deletion
Delete from table name where condition
Example: delete from students where id=5
# logical deletion
Update students isdelete=1 where.; / / add an isDelete column with a default value of 0, and delete it to change the value to 1
Example:
Update students isDelete=1 where id=6
When querying, only query the data of isDelete=0 to achieve the deletion effect.
Select * from students where isDelete=0
The simple steps of operating MySQL-2 data will stop here. If you want to know about other related issues, you can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.