table 7. Request to change the value of author field to admin in information with ID value greater than 38. Delete the data with ID number 4.Additional questions:
Add >15 test data to the message table, require three users to add
Check all message information
Query a user's message information.
Queries all data, sorted by time in descending order.
Get message with ID from 2 to 6 and sort by time descending
Count the number of messages left by each user and sort the
Requirements:1. Object has ID, host, port three properties2. Define tool create_id, randomly generate ID for each object at instantiation, guarantee ID unique3. Provide two kinds of instantiation mode, one: User incoming host and port mode two: Read host and port from configuration file to instantiate4. To customize the method for the object, save and Get_obj_by_id,save can automatically serialize the object to a file, the file path is db_path in the configuration file, the file name is the ID n
Tags: A * font a work put weight varchar length differentFunction:1.Function View string contains several special characters, such as ' A**B*CEDF ' contains several ' * '2.function to concatenate different work in the employee table into a string3.function calculates personal income tax, salary, salary income minus 3500,Tax-free rate (%) rate divisorNo more than 1500 3 0Over 1500 to 4500 10 105Over 4500 to 9000 20 555Over 9000 to 35000 25 1005--1Create or Replace functionSpecial_char (cinch varc
number and name of the student whose course number is 003 and the course score is more than 80
33. Number of students in selected courses
34. The name of the students with the highest grade and their achievements in the course of the "Lao Tzu" Teacher
35. Check each course and the corresponding number of elective
36. The student's number, course number, and student score of the students who have the same results in different courses
37. Retrieve the student number of at least two
sname. S.sname Select student s where S.ssex in (select Ssex from student where ssex= ' man ') 44, inquiries and "Li June" with the same sex and classmates sname. S.sname-Select-Student s where S.ssex in (select Ssex from student where ssex= ' man ') and S.class in(select class from student where Sname= ' Li June ') 45. Check the scores of all the "male" students who have enrolled in the "Introduction to Computer" course. S.* from score s inner joins course C on c.cno=s.cno inner joins stude
elective number is "3-105" course and the result is at least higher than the elective number "3-245" classmate's CNO, Sno and degree, and according to degree from high to low order.30, inquires the elective number is "3-105" and the result is higher than the elective number is "3-245" the course schoolmate's CNO, Sno and degree.31. Check the name, sex and birthday of all teachers and classmates.32, query All "female" teacher and "female" classmate's name, Sex and birthday.33. Check the scores o
waiting, go to MySQL to verify it.Verify success!2.Mysql> CREATE table if not exists upwd (uid Int (ten) primary key, Upwd varchar (+), email varchar (40));Import datamysql> INSERT INTO Upwd (UID, upwd, e-mail) select Uid,paw,email from upwd_12306;Query OK, 131653 rows affected (0.52 sec)records:131653 duplicates:0 warnings:03. mysql> SELECT * from upwd where email like ' 4145965 ';4. mysql> CREATE VIEW upwd_90 as SELECT * from upwd_12306 where substring (gmsfhm,7,4) >=1990;Query OK, 0 rows Aff
"95033" class students. Select AVG (degree) from student A,score b where a.class= ' 95033 ' and B.sno=a.sno 20, the inquiry score to choose to learn many courses of the students score is the record of non-highest scores. Select T.sno from Score t where t.degree 21. The result of the inquiry is higher than the record of "109" and the grade of the course number "3-105". SELECT * FROM score where cno= ' 3-105 ' and degree> (select Max (degree) from score where Sno = ' 109 ') 22. The SNO, sname
Write a simple query statement1. Display all the information of the Department tableSelect * FROM Dept;2. Show department number, department nameSelectdeptno,dname from Dept;3. Displays the following fields and string connections: Employee name, "1 month Salary:", salary. For example: Amy's 1 month Salary: 8000Select ename| | ' The one-month salary is: ' | | Sal Fromemp;4. Show employee name, work hours, workSelectename,hiredate,job from EMP;5. Show Employee Name: Alias name, annual salary (13 m
, Object ... params) for SQL statement operations in public class Dbutilsdemo {//Queryrunner Query (Connection conn, String sql, resultsethandlerConnection poolIn real development, "Get Connected" or "release resources" is a very consuming system resources of two processes, in order to solve such performance problems, usually we use the connection pooling technology, to share the connection connection. So that we don't have to create the connection each time, release the connection, these operat
Querying the database of 21-30 articlesMySQL Queryselect * FROM table LIMIT 20,10SQL Server Query2.1 Query the first 30 records according to the ID in ascending order, then query the results of the first 20 records according to the ID descendingSELECT * FROM (select top of * from table name ORDER by ID) T1 ORDER by id DESC) t2 ORDER by ID2.2 First 10 records will be queried and then the 10 messages will be removed from the result set.Select top * from table name where ID not in (select top of ID
sex of all the students of the sname.Select sname from student where ssex= (select Ssex from student where Sname= ' Li June ') and sname --subquery, find out the gender of Li June as the parameter of where selection condition, then and is excluded Li June, use to unequal number --44, inquiries and "Li June" with the same sex and classmates sname.Select sname from student where ssex= (select Ssex from student where Sname= ' Li June ')and sname --use subqueries to isolate Li June's class and gend
Tags: research and Development Select Table Practice ISA Relationship Comm varchar ExercisesOne, the existing three database tables, respectively, the Department table, Staff table, Department and Employee Relations table 1. Department tableCREATE TABLE ' t_dept ' (' ID ' int (8) not NULL auto_increment,' Dept_name ' varchar (the DEFAULT NULL COMMENT ' Department '),PRIMARY KEY (' id ')) CHARACTER SET UTF8 COLLATE utf8_general_ci comment= ' departmental table ID is the primary key '; 2. Employee
class number and the age from the big to the small order to query the student table all records.Select Class,sbirthday from Student Order by class Desc,sbirthday ASC--Question 41st, query "male" teachers and their courses.Select CNAME from course where TNO in (select TNO from teacher where tsex= ' man ')Select Tname,cname from teacher, course where teacher.tno=course.tno and tsex= ' men '--The 42nd question, the query highest score schoolmate's Sno, CNO and degree column.(1) SELECT * FROM score
Write a simple query statement1. Display all the information of the Department tableSelect * FROM Dept;2. Show department number, department nameSelectdeptno,dname from Dept;3. Displays the connection for the following fields and strings: Employee name. "1 months ' wages are:", wages.For example: Amy's 1 month Salary: 8000Select ename| | ' The one-month salary is: ' | | Sal Fromemp;4. Display employee name, working hours, workSelectename,hiredate,job from EMP;5. Show Employee Name: Alias name, a
the names of students with average scores above 80 (inclusive).Select Sname from StudentWhere Sno in(Select Sno from SCGROUP BY Sno have AVG (Grade) >=80)--h. Query the student's information for at least 95001 of all courses selected.Select SnameFrom studentWhere not Exists(SELECT * FROM SC Sc1Where Sno in (' 95001 ') and not Exists(SELECT * from SC where Sc.sno=student.sno and Sc1.cno=sc.cno))--------to increase the female classmate's "3" course performance by 10%.Update SC Set grade=grade*1.1
, inquiries and "Li June" with the gender of all students sname.Select sname from student where ssex= (select Ssex from student where Sname= ' Li June ')44, inquiries and "Li June" with the same sex and classmates sname.Select sname from student where ssex= (select Ssex from student where Sname= ' Li June ') class= (select class from Studen t where Sname= ' Li June ')45. Check the scores of all the "male" students who have enrolled in the "Introduction to Computer" course.SELECT * FROM score wh
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.