In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you the relevant knowledge points about how to create the mysql student table. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Title:
1. The construction table statement create table student (
Id varchar (20)
Name varchar (20)
Gender char (1)
Birth varchar (20)
Department varchar (20)
Address varchar (20)
) charset = utf8
two。 Insert data insert into student values
("201901", "Big Brother Zhang", "male", "1985", "Department of computer Science", "Haidian District, Beijing")
("201902", "Master Guo", "male", "1986", "Department of Chinese", "Changping District, Beijing")
("201903", "Zhang San", "female", "1990", "Chinese Department", "Yongzhou City, Hunan Province")
("201904", "Li Si", "male", "1990", "English Department", "Fuxin City, Liaoning")
("201905", "Wang Wu", "female", "1991", "English Department", "Xiamen City, Fujian Province")
("201906", "Wang Liu", "male", "1988", "computer Department", "Hengyang City, Hunan Province")
The results are as follows. ① the first step in solving the problem select
Department faculties
Case gender when "male" then 1 else 0 end male
Case gender when "female" then 1 else 0 end female
From student
The result is as follows: ② step 2 select
College and department
Sum male
Sum female
Total sum (male) + sum (female) as
From
(
Select department faculties
Case gender when "male" then 1 else 0 end male
Case gender when "female" then 1 else 0 end female
From student
) a
Group by faculty; the results are as follows
These are all the contents of the article "how to create the mysql Student form". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.