Sie sind auf Seite 1von 7

Sql

1. To remove duplicate rows from the result set of a SELECT use the
following keyword:
a. NO DUPLICATE
b. UNIQUE
c. DISTINCT
d. DELETE DUPLICATE

2. Which of the following statement can add a row to a table?


a. Add New
b. Insert Into
c. Add Record
d. Insert Newr

3. In a LIKE clause, you can ask for any value ending in "qpt" by writing
a. LIKE %qpt
b. LIKE *qpt
c. LIKE $qpt
d. LIKE *apt$

4. Oracle is a
a. Programming Langauge
b. Web Designing Tool
c. RDBMS Software
d. Operating System

5. Which of the following is not a valid aggregate function?


a. COUNT()
b. MAX()
c. MIN()
d. COMPUTE()

6. What SQL clause is used to restrict the rows returned by a query?


a. AND
b. WHERE
c. HAVING
d. FROM

7. _________ key uniquely identifies records in a Table.


a. Candidate
b. Super
c. Foreign
d. Primary

8. A SELECT command without a WHERE clause returns?


a. All the records from a table that match the previous WHERE clause
b. All the records from a table, or information about all the records
c. SELECT is invalid without a WHERE clause
d. No results

9. __________ is a basic storage unit of Database.


a. RDBMS
b. DBMS
c. Table
d. Query

10.An__________ enables you to store, organize, retrieve and manage


logically related data optimally.
a. DataGROUP
b. DBMS
c. Queries
d. RDBMS

11.Select the Odd one out.


a. Oracle
b. HTML
c. MySql
d. SQL Server

12.A _________ is a method used for linking two tables based on presence
of a common field found in both tables.
a. Linking
b. Testlink
c. Relationship
d. Connecting

13._________ is a process of removing redundant data from Database.


a. Normalisation
b. De-Normalisation
c. Redudantisation
d. Duplication

14.________ is a method of requesting information from Database.


a. Executing
b. Querying
c. Relationship
d. Data Warehousing

15.Select the Odd one out


a. DDL
b. DTL
c. DML
d. DCL
16._____________ statement is used to get information about columns of
table.
a. GETSTRUCT
b. SELECT
c. DESCRIBE
d. DESC

17. Which SQL statement is used to extract data from a database?


a. EXTRACT
b. GET
c. OPEN
d. SELECT

18. Which SQL statement is used to update data in a database?


a. SAVE
b. MODIFY
c. SAVE AS
d. UPDATE

19. With SQL, how do you select all the columns from a table named
"Persons"?
a. SELECT *.Persons
b. SELECT [all] FROM Persons
c. SELECT * FROM Persons
d. SELECT Persons

20. With SQL, how do you select all the records from a table named
"Persons" where the value of the column "FirstName" is "Peter"?
a. SELECT [all] FROM Persons WHERE FirstName='Peter'
b. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
c. SELECT * FROM Persons WHERE FirstName='Peter'
d. SELECT * FROM Persons WHERE FirstName<>'Peter'

21. Which SQL keyword is used to sort the result-set?


a. SORT
b. ORDER
c. ORDER BY
d. SORT BY

22. With SQL, how can you insert a new record into the "Persons" table?
a. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons
b. INSERT ('Jimmy', 'Jackson') INTO Persons
c. INSERT INTO Persons VALUES ('Jimmy', 'Jackson')
d. INSERT IN TO Persons VALUE ('Jimmy', 'Jackson')

23. How can you change "Hansen" into "Nilsen" in the "LastName" column in
the Persons table?
a. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
b. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
c. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
d. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

24. With SQL, how can you delete the records where the "FirstName" is
"Peter" in the Persons Table?
a. DELETE FROM Persons WHERE FirstName = 'Peter'
b. DELETE ROW FirstName='Peter' FROM Persons
c. DELETE FirstName='Peter' FROM Persons
d. DELETE FROM Persons WHERE FirstName = Peter

25. With SQL, how can you return the number of records in the "Persons"
table?
a. SELECT COLUMNS(*) FROM Persons
b. SELECT COUNT(*) FROM Persons
c. SELECT COLUMNS() FROM Persons
d. SELECT COUNT() FROM Persons

26.The _____ operator allows you to specify multiple values in a WHERE


clause.
a. IN
b. BETWEEN
c. =
d. AND

27._________ are used to specify rules for the data in a table.


a. Wildcards
b. Variables
c. Filters
d. Constraints

28._________ functions return a single value, calculated from values in a


column.
a. Aggregate
b. Inbuilt
c. Rowset
d. Data

29.The _________ statement is used in conjunction with the aggregate


functions to group the result-set by one or more columns.
a. ORDER BY
b. GROUP BY
c. GROUP
d. SUM
30.The _________ constraint enforces a column to NOT accept NULL values.
a. NOT NULL
b. NO NULL
c. NULL
d. ALWAYS NULL

31.A _______ defines what kind of value a column can contain.


a. RDBMS
b. Database
c. Table
d. Data type

32.A ________ contains rows and columns, just like a real table and data
from one or more real tables.
a. Database
b. View
c. Multiple Table
d. None of these

33.A ______ JOIN return all rows from multiple tables where the join
condition is met.
a. Outer
b. Inner
c. Multiple
d. Dual

34.A _________ can be created in a table to find data more quickly and
efficiently.
a. Primary Key
b. Counter
c. Index
d. Foreign Key

35.Select the Odd one out.


a. Insert
b. Update
c. Delete
d. Create

36.The ______ JOIN keyword returns all rows from the right table, with the
matching rows in the left table.
a. Right
b. Left
c. Inner Right
d. Inner Left

e.
37. SELECT * FROM Customers WHERE City LIKE '_erlin'; .This query returns
a. All customers with a City starting with any character, followed by "erlin":
b. All customers with a City starting with any number of characters, followed
by "erlin":
c. All customers with a City containing the pattern " erlin ":
d. Error

38. SELECT SUM(Quantity) TotalItemsOrdered FROM OrderDetails; This


query returns
a. The sum of all the "Quantity" fields for the "OrderDetails" table.
b. The sum of all the "Quantity" fields for the "OrderDetails" table without
null values
c. The sum of all the "Quantity" fields for the “TotalItemsOrdered” table
d. Error

39.Select the Odd one out.


a. CREATE
b. ALTER
c. DROP
d. UPDATE

40. The Sub query is placed in the _______ clause of a Select statement
a. Where
b. IN
c. Like
d. Distinct

41.A ___________is a list of integers generated in the ascending order.


a. Index
b. Numbering
c. Id
d. Sequence

42. ____________ is the process of efficiently organizing data in a database.


a. Inserting
b. Storing
c. Normalisation
d. Updating

43. A _______ in one table points to a PRIMARY KEY in another table.


a. Alternate Key
b. Foreign Key
c. Candidate Key
d. Unique Key
44. ‘DROP’ command performs the following action
a. Deletes all records from the table.
b. Deletes structure of the table.
c. Deletes entire table
d. Deletes all records from the table which meets certain criteria.

45. ________ ensures that the value in a column meets a specific condition.
a. Primary key constraint
b. Check constraint
c. Validation
d. Conditional Statement

46. ________ Command is used to add, modify and drop columns in table.
a. Update
b. Alter
c. Truncate
d. Manipulate

****

Das könnte Ihnen auch gefallen