Joke Collection Website - Joke collection - Computer SQL language test questions

Computer SQL language test questions

(1) The existing relational databases are as follows: database name: classmate table (student number char(6), name, gender, age, nationality, ID number, dormitory number) and dormitory table (dormitory number char(6), dormitory phone number) of our class. Sql statement code that uses SQL language to realize the following functions: 1. Create a database [database of classmates in our class] code. 2. Create data table [dormitory table] code; Dormitory table (Dormitory number char(6), Dormitory phone number) requires: primary key (Dormitory number), Dormitory phone number: 7 digits starting with 633. 3. Create data table [classmate table] code; Table of classmates (student number char(6), name, gender, age, nationality, ID number, dormitory number) requires: primary key (student number), foreign key (dormitory number), default (nationality), non-empty (nationality, name, age), unique (ID number), check (gender) 4. Add the following dormitory information to the code of the dormitory table: dormitory number: 65438+0016331571026331777, and change the dormitory number to10/dormitory phone number: List of students (student number, name, gender, age, nationality, ID number, dormitory number, dormitory phone number) 6. Query the name, gender and dormitory phone number of a female classmate named Zhang from the classmate list view. 7. Inquire the maximum age, minimum age and average age of female classmates from the classmate table. 8. Create a stored procedure with parameters [a dormitory student]: name, gender, dormitory phone number. Execute this procedure to inquire about' 10 1' dormitory. (2) The existing relational database is as follows: database name: student achievement database, student table (student number char(6), name, gender, nationality, ID number), course (curriculum) class number, score) sql statement code using SQL language to realize the following functions: 1. Create a database [student achievement database] code; 2. Create a [course] code; Curriculum schedule (class number char(6), name) requirements: primary key (class number), not empty (name) 3. Create a [student table] code; The student form (student ID char(6), name, gender, nationality and ID number) requires: primary key (student ID), default (nationality), non-blank (nationality, name), unique (ID number) and check (gender) 4. Create [report] code; Reports (ID, student number, class number, score) require: primary key (class number), foreign key (report. Student number, report card. Class number), check (score), automatic number (ID) 5. Add the following course information to the course code: course name 65438+ 0000 1 college Chinese 100002 college English 100003 Spanish revised course number 65438+. 000002 course name: Practical English Delete the course information with the course number 100003. 6. Write code to create a transcript view (student number, name, course number, course name, score); 8. Write and create: the stored procedure and code for calculating the highest score, lowest score and average score of a course; Execution: the highest score, the lowest score and the average score of all students majoring in applied English; 9. Search for female classmate surnamed Li: name, gender and nationality. 10. Search the information of all students who have obtained 90% or above in one or more courses, including their student numbers and names. (3) There is a [Student Courses] database, which contains three tables: the student table consists of five attributes: student number (Sno), name (sname), gender (Ssex), age (Sage) and department (Sdept), and the records are: students (Sno, Sname, ssex, sage. The curriculum consists of four attributes: course number (Cno), course name (Cname), prerequisite number (Cpno) and credit (Ccredit). The record is: course (CNO, CNAME, CPNO, CCredit) CNO is the key word. The report card SG consists of three attributes: student number (Sno), course number (Cno) and grade, with SG(Sno Cno, grade) (Sno, Cno) as the key words. Use SQL language to realize the following functions: 1. Establish a student table, in which the student number attribute cannot be empty and its value is unique. 2. Add "Scome" column to the student table, and its data type is date type. 3. Inquire about the student numbers and grades of the students who have taken the No.3 course, and the query results are arranged in descending order of scores. 4. Query 1 the highest score and average score of students in the course. 5. Ask the students in the same department as Yang Li. 6. Set the scores of all students in the computer department to zero.

Some secret men will never tell, so don't ask again, because if you ask again, the answer they give may not be true!

1, men like a woman easily, but they don't love a woman easily.

2. In the field of feelings, men are definitely bad kings. As long as a woman is willing to flatter, he will promise anything.

Men generally like women with gentle appearance, and are more willing to spend their energy on their careers or other places instead of conquering women.

4. Men don't pay much attention to women who are too kind to themselves.

Men are afraid of women's stalking, but they like to deal with women who haven't caught up in the same way.

6. One of men's dreams is to have a confidante who can transcend the boundaries of friendship.

7. Men will choose love with a rational attitude. Even if he loves someone emotionally, when he knows that she is not a good wife, he will give her up and find another one suitable for home life. Men think that love and marriage are two different things. Many times, the reason why he didn't get married was because he felt that the woman around him was not the good wife he imagined.

8. A man's requirements for his wife may be lower than those for his lover-in appearance, his personality is higher.

9. Not many men admire smart women. With them, men always feel insecure.

10, when there is a favorite woman present, men will have the following performances: talk a lot; Look smarter; Generous than usual; Will pull the topic to proud achievements; Will deliberately show kindness that is rarely seen at ordinary times; Tell more self-righteous jokes to make everyone laugh.

1 1, men are the embodiment of big men and small men at the same time. As a big man, he hopes that women will completely accommodate him and reassure him; As a nobody, he realized his weakness and hesitated. To put it bluntly, many of them are jealous and stingy ghosts, and they are as easy to be cheated as children.

12, men are willing to give up all freedom when pursuing women, and feel the importance of freedom more and more.

13, a man hides his curiosity. After hunting, he must tame her and turn her into a lovely animal that can be raised at home.

14, men have the arrogant mentality of being heroes, so it is easy to fall in love with women who complain to him.

15, men want women around them to understand that it's really boring to take the same woman to various places (maybe women feel the same way, but they are embarrassed to say it), so it's a relief and relaxation to date other women moderately, and there is no other attempt at all.

16. In sexual relations, a woman needs a man to tell her that he is willing to make any sacrifice for her, while a man needs a woman to tell him that he is capable.

17, the self-righteous affection of men is often downright unfortunate in the eyes of women.

18. In a man's mind, intimacy is the degree of love with a woman.

19, every once in a while, men will have emotional and physical strength to fall to the bottom for a few days. They don't want to meet anyone, so they hide and read books, listen to music, watch DVDs or play video games to vent.

Men who have talked about love know that women can't help lying, such as "I will always love you", "I will always love you like this", "I will come whenever you need me" and "I will never love another person as much as I love you". These are all "lies" that must be told but can never be persisted. Who makes women like listening so much?

2 1. When a man meets his ex-lover, most of them will flatter themselves, thinking that those who have had feelings with him will always have a feeling in their hearts, imagining that the woman who loved him will love him forever. Women only beautify men in front of men, but men unconsciously beautify their lost relationships. So men agree more than women: break up or be friends. Whether being dumped or not, most men are willing to keep in touch with their ex-girlfriends.

22. A woman cares about her boyfriend's ex-girlfriend, while a man cares about what kind of boyfriend a woman will find after she leaves him. If they are still friends after breaking up, he will criticize her boyfriend from time to time.

23. When a man is in love, he rarely asks her about the past, and he doesn't care much about what kind of man she has been in love with, because men value a woman's appearance more-appearance is now.

24. Men don't want to hear about their sweetheart's old love, because it is unbearable to think that the person they love had an intimate relationship with other men before.

25. In the face of two people who love themselves, a woman will choose between them, and a man will not worry about it-he just wants to catch up with two people at the same time!

26. When a man falls in love with a woman, he doesn't necessarily have a strong affection for her. On the contrary, I am more impulsive to some women I just like but don't love.

27. A man is easily attracted to a woman, but he can tell which desire comes from sex or love, and he probably knows what he can get from her.

28, women take the initiative to show love, for men, the only loss is to shorten that hazy, if there is no romantic day.

29. Men believe that one of the important performances to prove their Excellence is to have more women. The more successful a man is, he often needs the admiration and dedication of more women to show his uniqueness.

30. Men procrastinate on the issue of breaking up. In fact, they want to leave the problem of being with women and reduce the guilt caused by their decisions.

3 1, men say "future" is 6 months to 1 year, and women can define it as 10 to 50 years. When a man falls in love with a woman, he will only fantasize about how to develop intimately with her in the short future; Women fantasize about falling in love, getting married, having children and even how to grow old together.

32. Men are basically petty and generous. On the surface, they are informal, but they are as well calculated as women.

33. Women are more likely to confess their worries, while men are just the opposite. When they are in trouble, when they talk to individual friends, they will not say it completely, but always leave their last face. Men's confidences are all packaged or deliberately chopped, and no one can know everything. This is also the reason why it is difficult for women to understand men-they don't want to be fully understood.

A man can fall in love with two women at the same time, but he probably can't tell which one he likes better.

35. Men look at extramarital affairs more realistically than women, because he has more opportunities to involve extramarital affairs, and he knows in his heart that playboy is hidden in men's nature.

36. If a man wants to change his mind, it has nothing to do with whether a woman pays attention to maintaining a beautiful appearance. That's just one of his excuses. When he is tired of a woman, no matter how beautiful she is, he feels that any woman except her is more attractive.

37. Mature men are quite weak against girls who admire him.

38. The older a man is, the more he chooses a spouse, regardless of other people's ideas.

For many men, true love means love minus sex. In other words, as long as men feel that they lack sexual attraction, they can always be simple friends with women.

40. At the moment when a man has the urge to seek intimacy, his requirements for the opposite sex suddenly decrease, and he will feel that an ordinary woman is cute and even sexy. However, once the impulse subsided, he immediately resumed his habitual aesthetic judgment.

4 1, men's love for women is always mixed with physiological impulses. Before making out, he felt that all the women were fine, and then he could not miss them, but in order not to bear too much guilt, he could pretend to be gentle and continue to confide lingering love words afterwards.

42. It is easy for a man to fall in love with a coquettish woman who looks at his fingertips because he feels that he has more opportunities to contact.