Exam 12

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

WoldiaPolytechnic College

Department of Information and Communication Technology


Basic Structure Query language (SQL) module Exam for DBA L-3
Time allowed 1hr Total Point (50%)
Name ______________________________________IDNO____________
I. Choose the best answer the following questions(2pt each)
____1. SQL can be
A. Update records in a database C. Create views in a database
B. Delete records in a database D. All of the above
____2. Which of the following is valid SQL syntax change the data type?
A. ALTER TABLE table_name ATLER COLUMN Column _name Data type
B. ALTER TABLE table_name CHNANG COLUMN Column _name Data type
C. ALTER TABLE table_name DROP COLUMN Column _name Data type
D. ALTER TABLE table_name ADD Column _name Data type
____3. You can add a row using SQL in a database with which of the following?
A. ADD C. CREATE
B. INSERT D. MAKE
____4. The command to remove rows from a table ‘CUSTOMER’ is
A. REMOVE FROM CUSTOOMER …….. C. DELETE FROM CUSTOMER WHERE …….
B. DROP FROM CUSTOMER……. D. UPDATE FROM CUSTOMER …..
____5. The SQL WHERE clause:
A. Limits the column data that are returned.
B. Limits the row data are returned
C. Both A and B are Correct D. Neither A nor B are correct
____6. Which of the following is the original purpose of SQL?
A. To specify the syntax and semantics of SQL data definition language
B. To specify the syntax and semantics of SQL manipulation language
C. To define the data structures D. All of the above
____7. The wildcard in a WHERE clause is useful when?
A. An exact match is necessary in a SELECT statement.
B. An exact match is not possible in a SELECT statement.
C. An exact match is necessary in a CREATE statement.
D. An exact match is not possible in a CREATE statement.
____8. The command to eliminate a table from a database is:
A. REMOVE TABLE CUSTOMER; C. DELETE TABLE CUSTOMER;
B. DROP TABLE CUSTOMER; D. UPDATE TABLE CU
____9. The SQL keyword(s) ________ is used with wildcards.
A. LIKE only C. NOT IN only
B. IN only D. IN and NOT IN
____10.Which of the following is the correct order of keywords for SQL SELECT statements?
A. SELECT, FROM, WHERE C. WHERE, FROM,SELECT
B. FROM, WHERE, SELECT D. SELECT,WHERE,FROM
____11. The result of a SQL SELECT statement is a(n) ________ .
A. Report B. Form C. File D. table
____12. In an SQL SELECT statement querying a single table, according to the SQL standard the asterisk (*)
means that:
A. All columns of the table are to be returned.
B. All records meeting the full criteria are to be returned.
C. All records with even partial criteria met are to be returned.
D. None of the above is correct.
____13. The SQL wildcards are ____ and ____.
A. Asterisk (*); percent sign (%) C. Underscore (_); question mark (?)
B. Percent sign (%); underscore (_) D. Question mark (?); asterisk (*)
____14. The benefits of a standard relational language include which of the following?
A. Reduced training costs C. Applications are not needed.
B. Increased dependence on a single vendor D. All of the above.
____15. Which of the following do you need to consider when you make a table in SQL?
A. Data types C. Default values
B. Primary keys D. All of the above.
____16. The Microsoft Access wildcards are ____ and ____ .
A. Asterisk (*); percent sign (%) C. Underscore (_); question mark (?)
B. percent sign (%); underscore (_) D. question mark (?); asterisk (*)
____17. Which one of the following sorts rows in SQL?
A. SORT BY C. ORDER BY
B. ALIGN BY D. GROUP BY
____18. To sort the results of a query use:
A. SORT BY. C. ORDER BY.
B. GROUP BY. D. None of the above is correct.
____19. The SQL statement that queries or reads data from a table is ________ .
A. SELECT C. QUERY
B. READ D. None of the above is correct.
____20. One of following is not an example of Data type of SQL is
A. Char B. Memo C. Text D. Date
____21. To display a row if ALL conditions listed are true. Which of the following is SQL keywords
A. OR B. AND C. BETWEEN-----AND D. LIKE
____22. With SQL, how can you insert new records into FirstName and LastName columns in the “EMPLOYEE”
tables?
A. Insert into EMPLOYEE(FirstName,LastName) values(‘Haimanot’, ‘Aster’)
B. Insert into EMPLOYEE(‘Haimanot’, ‘Aster’)
C. Insert values into EMPLOYEE(‘Haimanot’, ‘Aster’)
D. Insert into (FirstName,LastName) values(‘Haimanot’, ‘Aster’)
____23.With SQL, how can you return all the records from a table named “EMPLOYEE” sorted descending by
FirstName?
A. Select * From EMPLOYEE Order FirstName Descend
B. Select * From EMPLOYEE Order By FirstNameDesc
C. Select * From EMPLOYEE Order By FirstNameAsc
D. Select * From EMPLOYEE Order By FirstName Ascend
____24. An operator displays a row if any of the conditions listed are true. Which of the ff is SQL keywords
A. AND B. OR C. Like D. IN
____25. Which of the following is NOT the Data Definition Language (DDL) command in DBMS?
A. Update B. Alter C. Create D. Drop

Name ___________________________________IDNO_____________

Answer
1. ___D__ 6. __D___ 11. _D____ 16. _D____ 21. ___B__
2. ___B__ 7. __B___ 12. _A____ 17. __C___ 22. __A___
3. __B___ 8. __B___ 13. _B____ 18. ___C__ 23. __B___
4. ___C__ 9. __A___ 14. __A___ 19. ___A__ 24. B_____
5. ___B__ 10. __A___ 15. __D___ 20. ___B__ 25. ____A_

You might also like