Fortune Telling Collection - Ziwei fortune-telling - Query the number of students surnamed Qian with sql.
Query the number of students surnamed Qian with sql.
1. Establish the database as school and activate the currently newly created database.
2. Table creation: it is stated in the definition that 1) each table must have a primary key; 2) The gender of students can only be' male' or' female'; 3) The student name cannot be empty; 4) The foreign key system name is created in the table class; 5) The system codes of related table departments cannot be duplicate or blank.
3. Insert the following data table: 10 1, Software, Computer, 2003, 102, Microelectronics, Computer, 2004, Student Table: 8 10 1, Zhang San, male. 12 1, Zhejiang,1984,8103, Wang Ling, female, 13 1, Fujian,1985,8/kloc.
4. Complete the following query functions: 1) query the student numbers, names and genders of all students, 2) query the student records from Fujian, 3) query the student names and calculate the student ages, 4) fuzzy query the records of girls surnamed Qian, 5) calculate the total number of all students by using aggregation function and alias them as the number of students, and 6) query the information of all classes and sort them in descending order of class numbers. 7) Update the name of the student whose student number is 8 103 to Zhang Ling; 8) Find the information of students whose student numbers are between 8 10 1 to 8 103; 9) Delete the student record with Li Fei's name; 10) Delete data table students.
- Previous article:The power of Wei zi's great emperor
- Next article:What trees bloom in July and August?
- Related articles
- The wind blows crape myrtle poems
- Teacher Wei Zi works.
- Wei Zi confessed to ChristianRandPhillips.
- What would it be like to preach that saints marry purple saints?
- Wei Zi juvenile songs
- The reservation of free scenic spots in Wuhan hasn't started yet. What happened? Why can't I make an appointment for free scenic spots in Wuhan?
- Wei Zi Real Estate Liabilities
- Wei Zi black line
- Which light rail does Tianjiao Yuan Jun take on Wei Zi Road in Yubei District?
- What's the use of woodcarving without words?