当前位置:网站首页>Tutorial on the principle and application of database system (057) -- MySQL exercises

Tutorial on the principle and application of database system (057) -- MySQL exercises

2022-07-26 01:10:00 Rsda DBA_ WGX

Database system principle and Application Tutorial (057)—— MySQL Exercises

One 、 Multiple choice questions

1、 Which of the following aggregate functions is used to sum the data ?(B)

A、MAX B、SUM C、COUNT D、AVG

2、SELECT At least the part of the statement is (B).

A、 only SELECT B、SELECT,FROM C、SELECT,GROUP D、SELECT,INTO

3、SQL Which of the following is used to express the condition in the statement ?(C)

A、THEN B、WHILE C、WHERE D、IF

4、 Which of the following statements can delete a column in the table ?(B)

A、alter table emp remove addcolumn B、alter table emp drop column addcolumn
C、alter table emp delete column addcolumn D、alter table emp delete addcolumn

5. To delete a table in the database S, You can use ( D).

A、DELETE TABLE S B、DELETE S C、DROP S D、DROP TABLE S

6、 Which of the following commands can be used to view the table structure ?(D)

A、FIND B、SELETE C、ALTER D、DESC

7、 What can't be done on a view is (D).

A、 Inquire about B、 Define a new view on the view C、 Update the view D、 Define a new table on the view

8、 Unique index (UNIQUE) The role of is (A).

A、 Ensure that the values of each row on the index cannot be repeated B、 Ensure that the value of each row on this index cannot be NULL
C、 Ensure that the columns participating in the unique index , Do not participate in other indexes D、 Ensure that the unique index cannot be deleted

9、 The command used to write transactions to the database is (C).

A、insert B、rollback C、commit D、savepoint

10. The following command can be used to search for names that are not NULL The record of ?(C)

A、WHERE NAME ! NULL B、WHERE NAME NOT NULL
C、WHERE NAME IS NOT NULL D、WHERE NAME!=NULL

11、 stay SQL In language , The subquery is (D).

A、 Select the query statement of the word segment subset in the single table B、 Select the query statement of the word segment subset in the multi table
C、 Returns the query language of the data subset in a single table D、 A query statement embedded in another query statement

12、 Which of the following commands is used to insert a record into the data table ?(B)

A、CREATE B、INSERT C、SAVE D、UPDATE

13、SQL The data manipulation statements of the language include SELECT、INSERT、UPDATE、DELETE etc. . The most important , The most frequently used statement is (B).

A、UPDATE B、SELECT C、DELETE D、INSERT

14、 Which of the following actions can achieve entity integrity ?(D)

A、 Set unique key B、 Set up foreign keys C、 Reduce data redundancy D、 Set primary key

15、SQL In language , The command to delete the view is (D).

A、REMOVE B、CLEAR C、DELETE D、DROP

16、 Which of the following commands is used to modify the database table structure ?(D)

A、UPDATE B、CREATE C、UPDATED D、ALTER

17、 The following (C) It does not belong to the connection type .

A、 The left outer join B、 Internal connection C、 The middle link D、 Cross connect

18、 Use the following SQL Statement creates a table SC:

CREATE TABLE SC (S# CHAR(6) NOT NULL,C# CHAR(3) NOT NULL,SCORE INTEGER,NOTE CHAR(20));

towards SC When inserting a table, such as the following line ,(B) Rows can be inserted .

A、(NULL,’103’,80,’ Elective ’) B、(’200823’,’101’,NULL,NULL)
C、(’201132’,NULL,86,’ ’) D、(’201009’,’111’,60, Compulsory )

19、 The command to delete the user account is (A).

A、DROP USER B、DROP TABLE USER C、DELETE USER D、DELETE FROM USER

20、 The following statement is wrong (A).

A、alter table emp delete column addcolumn; B、alter table emp modify column addcolumn char(10);
C、alter table emp change addcolumn addcolumn int; D、alter table emp add column addcolumn int;

21. Combine multiple SQL The operators of query statements to form combined queries are (D).

A、SELECT B、ALL C、LINK D、UNION

22、 Which of the following commands is used to create the database ?(D)

A、create mytest B、create table mytest C、database mytest D、create database mytest

23、 Which of the following options is used to implement grouping queries ?(C)

A、ORDER BY B、ORDERED BY C、GROUP BY D、GROUPED BY

24、SQL It's a kind of (C) Language .

A、 functional B、 Advanced algorithm C、 relational database D、 Artificial intelligence

25、 Which of the following commands is used to delete the data table ?(A)

A、DROP B、UPDATE C、DELETE D、DELETED

26、 In the basic table S Add a column in CN( Course name ), You can use (B).

A、ADD TABLE S ALTER(CN CHAR(8)) B、ALTER TABLE S ADD CN CHAR(8)
C、ADD TABLE S(CN CHAR(8)) D、ALTER TABLE S ADD CN CHAR(8)

27、 The following SQL In the sentence ,(B) Not a data definition statement .

A、CREATE TABLE B、GRANT C、CREATE VIEW D、DROP VIEW

28、 The following delete record command is correct (A).

A、delete from emp where name=‘dony’; B、Delete * from emp where name=‘dony’;
C、Drop from emp where name=‘dony’; D、Drop * from emp where name=‘dony’;

29、 Delete dealer 1018 Data record of , The correct code is (D).

_____from distributors where distri_num=1018;

A、drop table B、delete * C、drop column D、delete

30. The query results are arranged in descending order by name , The right order is (B).

A、ORDER BY DESC NAME B、ORDER BY NAME DESC
C、ORDER BY NAME ASC D、ORDER BY ASC NAME

31、 stay SELECT In the sentence , Use keywords (D) Duplicate lines can be masked .

A、TOP B、ALL C、UNION D、DISTINCT

32、 The average of the following aggregate function is (C).

A、COUNT B、MAX C、AVG D、SUM

33、 The function that returns the current date is (D).

A、curtime() B、adddate() C、curnow() D、curdate()

34、 The commands used to insert data and update data are (A).

A、INSERT,UPDATE B、CREATE,INSERT INTO C、DELETE,UPDATE D、UPDATE,INSERT

35、SELECT COUNT(SAL) FROM EMP GROUP BY DEPTNO;

The meaning of the above command is (D).

A、 Ask for the salary in each department B、 Find out the size of salary in each department
C、 Ask for the comprehensive salary in each department D、 Find the number of wages in each department

36、 The following command indicates that the descending sort is (C).

A、ASC B、ESC C、DESC D、DSC

37、 The data model does not include which of the following ?(D)

A、 relational model B、 Mesh model C、 hierarchical model D、 A network model

38、 There are three tables , The number of record lines is 10 That's ok 、2 Row sum 6 That's ok , After three tables are cross connected , There are (D) Row data .

A、18 B、26 C、 Not sure D、120

39、 from GROUP BY The clauses in the grouped result set filtered again with conditional expressions are (C).

A、FROM B、ORDER BY C、HAVING D、WHERE

40. The purpose of creating an index for a data table is (A).

A、 Improve the retrieval performance of queries B、 classified C、 Create unique index D、 Create primary key

41、 If you want to rollback a transaction , Need to use (D) sentence .

A、commit B、 begin transaction C、revoke D、rollback

42、 Which of the following is used to find records in the data table ?(C)

A、ALTRE B、UPDATE C、SELECT D、DELETE

43、 stay MySQL in , Establish a database to use (D).

A、CREATE TABLE command B、CREATE TRIGGER command
C、CREATE INDEX command D、CREATE DATABASE command

44、MySQL It's supposed to be 、 The user name of the super user with the highest permission is (D).

A、test B、Administrator C、DBA D、root

45. The following insert record is correct (A).

A、insert into emp(ename,hiredate,sal) values (value1,value2,value3);
B、insert into emp(ename,sal) values(value1,value2,value3);
C、insert into emp(ename) values(value1,value2,value3);
D、insert into emp(ename,hiredate,sal) values(value1,value2);

46、 stay SQL Views in the language are database (A).

A、 External mode B、 Storage mode C、 Pattern D、 Internal mode

47、 The following aggregate function calculates the number of records (D).

A、AVG B、SUM C、MAX D、COUNT

48. stay select In the sentence , The clause that implements the selection operation is (C).

A、select B、group by C、where D、from

49. Which of the following is used to find all the data tables in the database (B).

A、SHOW DATABASE B、SHOW TABLES C、SHOW DATABASES D、SHOW TABLE

50. The trigger does not respond to the following (A) Statement Mysql sentence .

A、select B、insert C、delete D、update

51、(A) Represents the beginning of a new transaction block .

A、START TRANSACTION B、BEGIN TRANSACTION C、BEGIN COMMIT D、START COMMIT

52. The following statement is incorrect (C).

A、select * from emp; B、select ename,hiredate,sal from emp;
C、select * from emp order deptno; D、select * from where deptno=1 and sal<300;

53.delete from employee; The function of a sentence is (B).

A、 Delete the entire... In the current database employee surface , Including table structure B、 Delete the current database employee All rows in the table
C、 Because there is no where Clause , So don't delete any data D、 Delete the current database employee The current row in the table

64. Group by class , Which of the following statements is used ?(C).

A、ORDER BY CLASSES B、DORDER CLASSES C、GROUP BY CLASSES D、GROUP CLASSES

55、 The function to format the date is (B).

A、DATEDIFF() B、DATE_FORMAT() C、DAY() D、CURDATE()

56、 It's in the database A surface , Including students , Discipline , achievement , The sequence number has four fields , The data contained are as follows :

Student Discipline achievement Serial number
Zhang San Chinese language and literature 60 1
Zhang San mathematics 100 2
Li Si Chinese language and literature 70 3
Li Si mathematics 80 4
Li Si English 80 5

Which column can be used as the primary key column (A).

A、 Serial number B、 achievement C、 Discipline D、 Student

57. Student relationship model S(S#,Sname,Sex,Age),S The attributes of represent the student's student number 、 full name 、 Gender 、 Age . Watch S Delete attribute in 【 Age 】,SQL Statement for (D).

A、UPDATE S Age B、DELETE Age from S
C、ALTER TABLE S ‘Age’ D、 ALTER TABLE S DROP Age

58. Which of the following options is used for left connection (C).

A、JOIN B、RIGHT JOIN C、LEFT JOIN D、INNER JOIN

59. The number of primary keys of a table is (C).

A、 at most 3 individual B、 There is no limit to C、 at most 1 individual D、 at most 2 individual

60.SQL Language is (D) Language , Easy to learn .

A、 Navigational B、 Process C、 format D、 Non procedural

61. Conditions BETWEEN 20 AND 30 Indicates age at 20 To 30 Between , And (D).

A、 Include 20 Age does not include 30 year B、 barring 20 Age includes 30 year
C、 barring 20 Age and 30 year D、 Include 20 Age and 30 year

62、 The following data types representing variable length strings are (C).

A、TEXT B、CHAR C、VARCHAR D、EMUM

63、 The following statement is true (B).

A、SELECT max(sal),deptno FROM EMP group by sal;
B、SELECT max(sal),deptno FROM EMP group by deptno;
C、SELECT max(sal),deptno FROM EMP;
D、SELECT max(sal),deptno FROM EMP group by job;

64、 The function to splice fields is (D).

A、SUBSTRING() B、TRIM() C、SUM() D、CONCAT()

65、 The following delete table statement is correct ().

A、Delete * from emp B、Drop table emp
C、Drop * from emp D、delete database emp

66、 The following statement is wrong (D).

A、GROUP BY Clause is used to group WHERE The output of the clause
B、WHERE Clause is used to filter FROM The row produced by the operation specified in clause
C、 Aggregate function needs and group by Use it together
D、HAVING Clause is used to start from FROM Filter rows in the results of

67、 The command to create a view is (D).

A、alter view B、alter table C、create table D、create view

68、 The function that returns the length of the string is (B).

A、len() B、length() C、left() D、long()

69、SQL Language set data query 、 Data manipulation 、 Data definition and data control function are integrated , among ,CREATE、DROP、ALTER What kind of function does the statement realize ?(C)

A、 Data manipulation B、 Data control C、 Data definition D、 Data query

70、 Which of the following options does not belong to DML operation ?(C)

A、insert B、update C、delete D、create

71、 It matters S(S#,SNAME,SAGE),C(C#,CNAME),SC(S#,C#,GRADE). among S# It's the student number ,SNAME It's the name of the student ,SAGE It's the age of the students , C# It's the course number ,CNAME It's the name of the course . Check options 【ACCESS】 The age of the class is not less than 20 Names of all students .SQL Statement for :

SELECT SNAME FROM S,C,SC WHERE (D).

A、SAGE>=20 and CNAME=’ ACCESS’
B、S.S# = SC.S# and C.C# = SC.C# and SAGE in>=20 and CNAME in ‘ACCESS’
C、SAGE in>=20 and CNAME in ‘ACCESS’
D、S.S# = SC.S# and C.C# = SC.C# and SAGE>=20 and CNAME=‘ACCESS’

72、 Which of the following options belongs to DDL operation ?(B)

A、update B、create C、insert D、delete

73、 Conditions AGE IN (20,30,40) Express ()

A、 Age 20 To 40 Between B、 Age 20 To 30 Between C、 Age is 20 or 30 or 40 D、 Age 30 To 40 Between

74、 Which of the following commands is used to update the records in the data table ?(C)

A、DELETE B、ALTRE C、UPDATE D、SELECT

75、 Primary key in relational database (D).

A、 Create a unique index , Allow null value B、 Only the first field in the table is allowed to create
C、 Allow multiple primary keys D、 Identifies the unique entity in the table

76、 Enter the database to be operated TEST Which of the following commands is used ?(D)

A、IN TEST B、SHOW TEST C、USER TEST D、USE TEST

77、 It's in the database A surface , Including students , Discipline , The grade has three fields , The data are as follows :

Student Discipline achievement
Zhang San Chinese language and literature 80
Zhang San mathematics 100
Li Si Chinese language and literature 70
Li Si mathematics 80
Li Si English 80

Count the highest scores of each subject , The order is :(B).

A、select Student ,max( achievement ) from A group by Student ;
B、select Discipline ,max( achievement ) from A group by Discipline ;
C、select Student ,max( achievement ) from A order by Student ;
D、select Student ,max( achievement ) from A group by achievement ;

78、 The following description of the primary key is correct (C).

A、 The primary key can be repeated B、 The primary key is not unique C、 Unique index in the data table D、 For primary key foreign key modification

79、 database server 、 The correct way to say the relationship between database and table is (B).

A、 A database server can only manage one database , A database can only contain one table
B、 A database server can manage multiple databases , A database can contain multiple tables
C、 A database server can only manage one database , A database can contain multiple tables
D、 A database server can manage multiple databases , A database can only contain one table

80、 It's in the database A surface , Including students , Discipline , The grade has three fields , The data are as follows :

Student Discipline achievement
Zhang San Chinese language and literature 60
Zhang San mathematics 100
Li Si Chinese language and literature 70
Li Si mathematics 80
Li Si English 80

Statistical highest score >80 The subject of (C).

A、SELECT MAX( achievement ) FROM A GROUP BY Discipline HAVING MAX( achievement )>80;
B、SELECT Discipline FROM A GROUP BY Discipline HAVING achievement >80;
C、SELECT Discipline FROM A GROUP BY Discipline HAVING MAX( achievement )>80;
D、SELECT Discipline FROM A GROUP BY Discipline WHERE MAX( achievement )>80;

81、 Count the number of people in each department , The order is :(D).

A、SELECT SUM(ID) FROM EMP GROUP BY DEPTNO;
B、SELECT SUM(ID) FROM EMP ORDER BY DEPTNO;
C、SELECT COUNT(ID) FROM EMP ORDER BY DEPTNO;
D、SELECT COUNT(ID) FROM EMP GROUP BY DEPTNO;

Two 、 Multiple choice questions

1、 A trigger is one or a group of triggers that are automatically executed in response to the following statements MYSQL sentence (A、B、D).

A、UPDATE B、INSERT C、SELECT D、DELETE

2、 The correct way to say delete is (A、B、C、D).

A、drop database Database name : Delete database
B、delete from Table name ; Delete all records in the table
C、delete from Table name where Field name = value ; Delete the qualified record strip
C、drop table Table name ; Delete table

3、 The following statement is correct (B、C、D).

A、 Keywords can only be composed of a single attribute
B、 In a relationship , The value of keyword cannot be empty
C、 All candidate keywords in a relationship can be designated as primary keywords
D、 Keywords are attributes in a relationship that can be used to uniquely identify tuples

4、 The following statement about primary key is correct (A).

A、 It can be a field in the table
B、 It is the unique identification field that determines the table records in the database
C、 This field cannot be empty or duplicate
D、 It can be composed of multiple fields in the table

5.mySQL Logical operators that support logical operators are (C、D).

A、&& B、|| C、NOT D、AND

6、 The following is not floating point (A、B、C).

A、smallint B、mediumint C、float D、int

7. The following correct command is (A、C、D).

A、show tables; B、show columns; C、show columns from customers; D、show databases;

8、 Which of the following logical operators has incorrect priority (A、C、D).

A、AND、NOT、OR B、NOT、AND、OR C、OR、NOT、AND D、OR、AND、NOT

answer :A,C,D

9、 The following statement is wrong (B、D).

A、select * from orders where ordername is not null;
B、select * from orders where ordername<>null;
C、select * from orders where ordername is null;
D、select * from orders where ordername not is null;

10、 In the following statement about relationship, the correct one is (A、B、C).

A、 The order of rows in the table is irrelevant B、 The values of any two rows in the table cannot be the same
C、 The order listed in the table is irrelevant D、 The values of any two columns in the table cannot be the same

11. The following systems belong to the relational database management system (A、B、D).

A、MS_SQL SERVER B、Oracle C、IMS D、DB2

12. Here is MYSQL The purpose of the comparison operator is (A、B、D).

A、!= B、<> C、== D、>=

13、 About DELETE and TRUNCATE TABLE That's what I'm saying , The right is (B、D).

A、 Both can delete records of specified entries B、 The former can delete records of specified entries , The latter cannot
C、 Both reverse the number of deleted records D、 The former returns the number of deleted records , The latter does not return

14、 The following statement is correct (A、B).

A、 stay MySQL in , Empty tables are not allowed , That is, no fields are allowed in a data table .
B、 stay MySQL in , For the database stored on the server , Users can access through any client .
C、 The structure of the data table contains column names 、 type 、 length 、 Record .
D、 The constant signs of character data are single quotation marks and double quotation marks , And the two symbols can be mixed .

15、 The following database name is legal (C、D).

A、db1/student B、db1.student C、db1_student D、db1&student

16. In the following sentence , It means that the condition of worry is id=1002 or id=1003 Yes. (A、B).

A、select * from products where id=1002 or id=1003;
B、select * from products where vend_id in (1002,1003);
C、select * from products where vend_id not in (1004,1005);
D、select * from products where vend_id=1002 and vend_id=1003;

17、 Which of the following column types are numeric data (A、B、D).

A、DOUBLE B、INT C、SET D、FLOAT

18、 The following negative sentences are matched correctly (A、C、D).

A、not in B、in not C、not between and D、is not null

19、 Which of the following are mySQL Data type of (A、B、C、D).

A、BIGINT B、TINYINT C、INTEGER D、INT

20. About group by The correct statement is (A、B、C、D).

A、SELECT store_name FROM Store_Information GROUP BY store_name;
B、SELECT SUM(sales) FROM Store_Information GROUP BY sales;
C、SELECT store_name, price,SUM(sales) FROM Store_Information GROUP BY store_name,price;
D、SELECT store_name, SUM(sales) FROM Store_Information GROUP BY store_name;

21、 What kinds of data models are there in the database system ?(G、C、D)

A、 Entity connection model B、 relational model C、 Mesh model D、 hierarchical model

22、 Correct CREATE The sentence is (A).

A、create table Table name ( Field name 1 Field type , Field name 2 Field type ,…);
B、create tables Table name ( Field type , Field name 1 Field type , Field name 2…);
C、create tables Table name ( Field name 1 Field type , Field name 2 Field type ,…);
D、create table Table name ( Field type , Field name 1 Field type , Field name 2…);

23、show databases like ‘student%’ The command can display the following databases (A、B、D).

A、student_my B、studenty C、mystudent D、student

24、 Which of the following data is character data ?(B、C、D)

A、 China B、‘1+2’ C、‘can’t’ D、‘ Zhang San - Li Si ’

25、 About statements limit 5,10, It's true that (C).

A、 Indicates that the... Is retrieved 5 The line 10 Bar record B、 Indicates that the... Is retrieved 10 The line 5 Bar record
C、 Indicates that the... Is retrieved 6 The line 10 Bar record D、 Indicates the search trip 10 At the beginning 10 Bar record

26、SQL Language includes (A、B、D).

A、DCL B、DML C、DNL D、DDL

27、 The following statement is correct (A、B、C、D).

A、alter table user drop column sex;
B、alter table user add sex varchar(20);
C、alter table user drop sex;
D、alter table user modify id int primary key;

28、 Arithmetic operator 、 Comparison operator 、 The incorrect priority of logical operators is (A、B、C).

A、 The arithmetic 、 Logic 、 Compare B、 Compare 、 Logic 、 The arithmetic
C、 Compare 、 The arithmetic 、 Logic D、 The arithmetic 、 Compare 、 Logic

29、 Execute the command twice consecutively for the same stored procedure :DROP PROCEDURE IF EXISTS, will (B、D).

A、 Execute delete stored procedure for the first time , A second error occurs
B、 Execute delete stored procedure for the first time , No prompt for the second time
C、 Stored procedures cannot be deleted
D、 Finally delete the stored procedure

30、 About sorting search results , The right is (A、C).

A、 keyword DESC Representation of descending order ,ASC Expressing ascending order
B、 If you specify multi column sorting , Only use ascending or descending keywords in the last column
C、 If you specify multi column sorting , You can use ascending or descending keywords in any column
D、 keyword ASC Representation of descending order ,DESC Expressing ascending order

31、 The following statement is wrong (B、D).

A、SELECT rank, AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000;
B、SELECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank;
C、SELECT AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000;
D、SELECT rank, AVG(salary) FROM people GROUP BY rank WHERE AVG(salary) > 1000;

32、 When creating a data table , Which of the following column types can be omitted ?(A、B、D)

A、DATE B、INT C、CHAR D、TEXT

33、 Need to display from 20XX year 1 month 1 The day is coming 20XX year 12 month 31 Names and dates of employment of all staff employed on the day . Employee information sheet tblEmployees Include columns Name And column HireDate, Which of the following statements can complete this function ?(C、D)

A、SELECT Name, HireDate FROM tblEmployees;
B、SELECT Name, HireDate FROM tblEmployees WHERE HireDate =’2009-01-01’ OR ‘2009-12-31’;
C、SELECT Name, HireDate FROM tblEmployees WHERE HireDate BETWEEN ’2009-1-1’ AND ‘2009-12-31’;
D、SELECT Name, HireDate FROM tblEmployees WHERE substring(HireDate,1,4)=2009;

34、 Which of the following are the characteristics of transactions ?(A、B、C、D)

A、 independence B、 persistence C、 Atomicity D、 Uniformity

35、 The following statement is correct (C、D).

A、show database; Display all databases
B、show table; Show all tables
C、show tables; Show all tables
D、show databases; Display all databases

36、 sentence :select * from products where prod_name like ‘%se%’; The result set of includes ().

A、products In the table prod_name Columns ‘se’ Data at the end
B、products In the table prod_name Columns ‘se’ Initial data
C、products In the table prod_name Column contains 'se ' The data of
D、products In the table prod_name Column does not contain 'se ' The data of

37、 stay mysql You can enter a SQL sentence , And (A、C、D) ending , Then press enter to execute the statement .

A、\G B、. C、\g D、;

38、 About insert The following statement is correct (C、D).

A、insert into Table name values( Field name 1 Corresponding value );
B、insert into Table name values( Field name 1 Corresponding value , Field name 2 Corresponding value );
C、insert into Table name ( Field name 1) values ( Field name 1 Corresponding value );
D、insert into Table name ( Field name 1, Field name 2) values( Field name 1 Corresponding value , Field name 2 Corresponding value );

3、 ... and 、 Completion

1、select 9/3; As the result of the (3.0000).

2、 Complete the sentence :select vend_id,count(*) as num_prods from products group by (vend_id);

3、 use SELECT When making fuzzy queries , You can use a match , But use in the condition value ( Underline :_) or % Wait for wildcards to match the query .

4、 When the queried table is not in the current database , You can use ( database . Object name ) Format to indicate table or view objects ;

5、 sentence SELECT ‘1+2’; It turns out that (12).

6、 If MySQL The service name is MySQL5, It's in Windows In the command window of , start-up MySQL The service instruction is :(net start mysql5).

7、MySQL It's a kind of ( Multi user )( Multi user 、 A single user ) Database management system .

8、select '2.5a’+3; As the result of the (5.5).

9、select (NULL<=>NULL) is NULL; As the result of the (0).

10、 The command statement for creating a data table is :(create table)

11、(ALTER TABLE) Statement can modify the order of columns in the table

12、 When a field is to be used AUTO_INCREMENT When the properties of the , The field must be ( Integers ) Data of type .

13、 When a field is to be used AUTO_INCREMENT When the properties of the , Except that the field must be of the specified type , This field must also be ( Key field or index field ).

14、 stay SELECT Of the statement FROM Clause can specify multiple tables or views , We should use ( comma ) Separate .

15、Table ‘a1’ already exists The meaning of this error message is ( surface a1 Already exist ).

16、 For a more than 200 The content of Chinese characters , Apply one (varchar or text) Type field to store .

17、 stay INSERT Trigger , You can quote a name as (new) The virtual table of , Access the inserted row .

18、smallint The number of bytes occupied by the data type is (1).

19、 stay DELETE Trigger , You can quote a name as (old) The virtual table of , Access to deleted lines .

20、 View the table name in the current database , The sentence is (show tables).

21. The command to delete the table is :(drop table).

22、select ‘Abc’=‘abc’; As the result of the (1).

23.select -2.0*4.0; As the result of the (-8.00).

24、tinyint The number of bytes occupied by the data type is (1).

25. Complete the sentence :select vend_id,count(*) from products where prod_price>=10 group by vend_id (having)count(*)>=2;

26、 use SELECT When making fuzzy queries , have access to (like) Operator .

Four 、 Judgment questions

(T)1、 The key is forcibly defined as NOT NULL and UNIQUE.

(F)2、select The filter condition of the statement can be placed in where clause , It can also be placed in from clause .

(T)3、 If an index is established on the sorted and grouped objects , Can greatly increase speed .

(T)4、 The purpose of indexing is to speed up the query and restrict the input data .

(T)5、UPDATE Statements can have WHERE Clause and LIMIT Clause .

(F)6、x between y and z Equate to x>y && x<z.

(F)7、MySQL Database management system can only be used in Windows Running under the operating system .

(F)8、 For string data , An empty string (‘’) Namely NULL, For numeric data 0 Namely NULL.

(T)9、NULL and Null All represent null values .

(T)10、 Relational database management system is abbreviated as RDBMS.

(T)11、ALTER TABLE Statement can modify the order of columns in the table .

(T)12、!= and <> Does not mean that .

(T)13、SELECT Of the statement ORDER BY The column referenced by the sorting expression defined by clause can not appear in the output list .

(F)14、 stay C/S In the pattern , The client cannot be installed on the same machine as the server .

(F)15、UPDATE The statement modifies the data in the table , You can also modify the structure of the table .

(T)16、create table There is an option to define the primary key in the statement .

(F)17、 Structured query language only involves statements that query data , Statements that modify and delete data are not included .

(T)18、 One delete Statement can delete multiple lines .

(T)19、INSERT The data row inserted by the statement can come from another SELECT The result set of the statement .

(T)20、 all TIMESTAMP Listed in insert NULL When the value of , Automatically fill in the current date and time .

(T)21、 with GROUP BY Clause SELECT sentence , Each group in the result set is represented by only one row of data .

(T)22、UNION in ALL Keyword is used to list all rows in the result set , Whether there are duplicate lines .

(F)23、 Only one column in the table can be defined as a primary key , You cannot define multiple columns as composite primary keys .

(F)24、 When all rows in a table are delete After the statement is deleted , The table was also deleted .

原网站

版权声明
本文为[Rsda DBA_ WGX]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/207/202207260106035804.html