0% found this document useful (0 votes)
19 views9 pages

Rdbmsmcqs Part 1

College work

Uploaded by

Aachal Jaiswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views9 pages

Rdbmsmcqs Part 1

College work

Uploaded by

Aachal Jaiswal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

RDBMS MCQ’s By H. P.

Jain

Part -1

Sr. No. Questions / Description

1. SQL stands for ______.


[A] Structure Query Language. [B] Structure Query List.
[C] Simple Query Language. [D] Simple Query List.

2. SQL can be used to


[A] Create database structure only. [B] Query database data only.
[C] Modify the database data only. [D] All of the mentioned.

3. ________ represents the structure of the database in a formal language acceptable by the
DBMS.
[A] Database Schema. [B] ER Diagram. [C] Database Table. [D] None of these.

4. Which of the following is not the valid Oracle type?


[A] Number [B] Char [C] Date [D] Float

5. Which datatype can store unstructured data in a column?


[A] Char [B] Raw [C] Number [D] Varchar2

6. ________ are padded with space characters to match the specified length.
[A] VARCHAR [B] VARCHAR2 [C] CHAR [D] CHAR2

7. ________ data type stores fixed length character string.


[A] CHAR [B] VARCHAR2 [C] DATE [D] NUMBER

8. ________ data type stores variable length character string.


[A] CHAR [B] VARCHAR2 [C] DATE [D] NUMBER

9. The standard Oracle date format is


[A] ‘DD-MM-YY’ [B] ‘DD-MM-YYYY’ [C] ‘MON-DD-YY’ [D] ‘DD-MON-YY’

10. The data type which can be fixed length or varying length as CHAR(n) or VARCHAR(n)
respectively is classified as
[A] Ternary string. [B] Binary string. [C] Schema string [D] Character string

11. Which operator is used to compare a value to a specified list of values?


[A] ANY [B] BETWEEN [C] ALL [D] IN

12. Name the operator that tests column for absence of data?
[A] NOT Operator [B] Exists Operator [C] IS NULL Operator [D] None of them.

1
RDBMS MCQ’s By H. P. Jain

13. Which operator is used to compare the NULL values in SQL?


[A] Equal [B] IN [C] IS [D] None of these

14. Which of the following operator can be used with a multiple-row subquery?
[A] = [B] BETWEEN [C] NOT IN [D] < >

15. Which operator performs pattern match?


[A] BETWEEN [B] LIKE [C] EXISTS [D] None of these

16. When three or more AND operator or OR operator conditions are combined, it is easier to
use the ______ SQL keyword(s)
[A] LIKE Only [B] NOT IN Only [C] IN Only [D] Both IN and NOT IN

17. The SQL keyword BETWEEN is used


[A] to limit the column displayed. [B] for range. [C] as a wildcard. [D] None of
these.

18. Which of the following SQL operations demands the used of wild cards comparison?
[A] IN [B] BETWEEN [C] EXISTS [D] LIKE

19. Which of the following is not the comparison operator?


[A] < > [B] < [C] =< [D] >=

20. Which of the following is / are the comparison operators in SQL?


[A] = [B] LIKE [C] BETWEEN [D] All of these

21. The SQL set operation includes


[A] Union [B] Intersect [C] Minus [D] All of these.

22. The operator || is an example of _______ function.


[A] Continuation [B] Integration [C] Concatenation [D] None of these.

23. Which of the following operator cannot be used in a sub-query?


[A] IN [B] ANY [C] ALL [D] AND

24. RDBMS is a collection of ______.


[A] Tables [B] Fields [C] Records [D] Keys

25. Which of the following is / are the examples of relational database management system
software?
[A] Oracle [B] SQL Server [C] Microsoft Access [D] All of these

26. Which of the following do we need to consider when we make a table in SQL?
[A] Data-type [B] Primary Key [C] Default Values [D] All of these.

2
RDBMS MCQ’s By H. P. Jain

27. Which of the following is not a set of SQL statements?


[A] Data Manipulation Language (DML). [B] Data Definition Language (DDL).
[C] Data Control Language (DCL). [D] Data Communication Language (DCL).

28. Which command defines columns, integrity constraints for table while creating a table?
[A] CREATE TABLE Command. [B] Drop Table Command.
[C] Alter Table Command. [D] All of the mentioned.

29. Name the command used for removing a table and all its data from the table.
[A] CREATE TABLE Command. [B] Drop Table Command.
[C] Alter Table Command. [D] All of the mentioned.

30. The _______ command makes the updates performed by the transaction permanent in the
database?
[A] ROLLBACK [B] COMMIT [C] TRUNCATE [D] DELETE

31. Which of the following is not a DDL command?


[A] Truncate [B] Alter [C] Create [D] Update

32. Which of the following are TCL commands?


[A] Commit and Rollback. [B] Update and Truncate
[C] Select and Insert [D] Grant and Revoke

33 Which statement is used to delete all rows / records in a table without deleting structure of
the table?
[A] DROP [B] DELETE [C] TRUNCATE [D] REMOVE

34. In which of the following cases a DML statement is not executed.


[A] When existing rows are modified. [B] When a table is deleted.
[C] When some rows are deleted. [D] All of these.

35. If we have not specified ASC or DESC after a SQL ORDER BY clause, which of the
following is used as default order
[A] DESC [B] ASC [C] There is no default value. [D] None of them.

36. In an SQL statement, which of the following parts states the conditions for row selection?
[A] Where [B] From [C] Order By [D] Group By

37. Which of the following keyword is used with Data Control Language (DCL) statements?
[A] SELECT [B] INSERT [C] DELETE [D] GRANT

3
RDBMS MCQ’s By H. P. Jain

38. A type of query that is placed within the WHERE or HAVING clause of another query is
called ________.
[A] Master Query [B] Sub Query [C] Super Query [D] Multi-Query.

39. _________ clause is an additional filter that is applied to the result.


[A] Select [B] Group By [C] Having [D] Order By

40. Which of the following is true about the HAVING clause?


[A] Similar to the WHERE clause but is used for columns rather than groups.
[B] Similar to the WHERE clause but is used for rows rather than columns.
[C] Similar to WHERE clause but is used for groups rather than rows.
[D] Acts exactly like a WHERE clause.

41. How can we change “FYBMS” into “SYBMS” in the “class” column in the “student” table?
[A] UPDATE student SET class = ‘FYBMS’ INTO class = ‘SYBMS’
[B] MODIFY student SET class = ‘SYBMS’ WHERE class = ‘FYBMS’
[C] MODIFY student SET class = ‘FYBMS’ INTO class = ‘SYBMS’
[D] UPDATE student SET class = ‘SYBMS’ WHERE class = ‘FYBMS’

42. Which command is used to change the definition of a table in SQL?


[A] CREATE [B] UPDATE [C] ALTER [D] SELECT

43 Which of the following is the correct order of a SQL statement?


[A] SELECT, GROUP BY, WHERE, HAVING
[B] SELECT, WHERE, GROUP BY, HAVING
[C] SELECT, HAVING, WHERE, GROUP BY
[D] SEELCT, WHERE, HAVING, GROUP BY

44. Which statement is used to get all the data from the student table whose name starts with p?
[A] SELECT * FROM student WHERE name LIKE ‘%p%’;
[B] SELECT * FROM student WHERE name LIKE ‘p%’;
[C] SELECT * FROM student WHERE name LIKE ‘_p%’;
[D] SELECT * FROM student WHERE name LIKE ‘%p’;

45. In SQL, Which command is used to SELECT only one copy of each set of duplicate rows
[A] SELECT DISTINCT [B] SELECT UNIQUE
[C] SELECT DIFFERENT [D] All of the mentioned.

46. Which of the following is / are the DDL statements?


[A] Create [B] Drop [C] Alter [D] All of the mentioned.

4
RDBMS MCQ’s By H. P. Jain

47. In SQL, which command(s) is(are) used to change a table’s storage characteristics?
[A] ALTER TABLE [B] MODIFY TABLE [C] CHANGE TABLE [D] All of
these.

48. Which of the following is not included in DML (Data Manipulation Language)?
[A] INSERT [B] UPDATE [C] DELETE [D] CREATE

49. TRUNCATE statement in SQL is a ____________.


[A] DML Statement. [B] DDL Statement. [C] DCL Statement. [D] TCL Statement.

50. Name the command used to add new rows to the table.
[A] Alter Table [B] Add Row [C] Insert [D] Append

51. DCL stands for __________.


[A] Data Control Language. [B] Data Console Language.
[C] Data Control Level. [D] Data Control Level.

52. TCL stands for ___________.


[A] Transaction Control Language. [B] Transaction Connect Language.
[C] Transaction Command Language. [D] None of the mentioned.

53 ________ commands in SQL allow controlling access to data within database.


[A] Data [B] Database [C] Data Control [D] All of the mentioned.

54. A transaction which completes its execution is said to be


[A] Committed. [B] Aborted. [C] Rolled back [D] Failed.

55. Which of the following keyword is used with Data Control Language (DCL) statement?
[A] SELECT [B] INSERT [C] DELETE [D] GRANT

56. DCL provides commands to perform actions like ___________.


[A] Change the structure of table.
[B] Insert, Update or Delete records and data values.
[C] Authorizing access and other control over database.
[D] None of the above.

57. A database language concerned with the definition of the whole data structure and schema
is ___________.
[A] DCL [B] DML [C] DDL [D] TCL

5
RDBMS MCQ’s By H. P. Jain

58. To obtain / display the structure of an Oracle table, the command used is
[A] STRUCTURE table-name [B] DESCRIBE table-name
[C] DESCRIBE STRUCTURE table-name [D] DESC TABLE table-name

59. The FROM clause is used to _________.


[A] Specify table-name(s) from which we are using retrieving/selecting or deleting
data. [B] Specify the range of search conditions.
[C] Specify the name of column(s) to be displayed.
[D] Specify the search condition.

60. Which of the following SQL commands is used to retrieve data?


[A] DELETE [B] INSERT [C] SELECT [D] JOIN

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


[A] SAVE [B] UPDATE [C] CHANGE [D] MODIFY

62. The SQL statement used to delete data from a database table is
[A] COLLAPSE [B] REMOVE [C] ALTER [D] DELETE

63 Which clause is used to sort the result set?


[A] SORT BY [B] ORDER [C] ORDER BY [D] SORT

64. The command used to undo all the updates performed by the SQL in the transactions is
[A] ROLLBACK [B] COMMIT [C] TRUNCATE [D] DELETE

65. The SQL ALTER statement is used to


[A] Change the table data. [B] Change the table structure.
[C] Delete the rows from the table. [D] Add rows to the table.

66. The SQL command used to delete the column(s) from a table is
[A] MODIFY TABLE table-name DROP column-name
[B] MODIFY TABLE table-name DROP COLUMN column-name
[C] ALTER TABLE table-name DROP column-name
[D] ALTER TABLE table-name DROP COLUMN column-name

67. The command used to add column(s) to an existing table is


[A] ALTER TABLE table-name ADD column-name
[B] ALTER TABLE table-name ADD COLUMN column-name
[C] MODIFY TABLE table-name ADD column-name
[D] MODIFY TABLE table-name ADD COLUMN column-name

6
RDBMS MCQ’s By H. P. Jain

68. The command used to delete all rows from the customer table is
[A] DROP * FROM customer; [B] UPDATE * FROM customer;
[C] REMOVE * FROM customer; [D] DELETE * FROM customer;

69. The SQL WHERE clause


[A] Limits the row data are returned. [B] Limits the column data that are returned.
[C] Both A and B are correct. [D] Neither A nor B are correct.

70. The command used to eliminate / erase / delete from a database is


[A] DROP TABLE table-name; [B] DELETE TABLE table-name;
[C] REMOVE TABLE table-name; [D] UPDATE TABLE table-name;

71. In a SELECT statement querying a single table, the use of asterisk (*) means
[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.

72. _________ specifies a search condition for a group or an aggregate.


[A] GROUP BY Clause. [B] HAVING Clause.
[C] FROM Clause. [D] WHERE Clause.

73 Drop Table cannot be used to drop a table referenced by a __________ constraint.


[A] Local Key. [B] Primary Key. [C] Composite Key. [D] Foreign Key.

74. What is the role of the revoke command?


[A] To give privilege [B] To get back privilege
[C] To execute the query [D] To run a program

75. The clause ALTER TABLE in SQL can be used to


[A] Add an attribute [B] Delete an attribute
[C] Alter the default values of an attribute [D] All of the mentioned.

76. Which of the following is / are transaction control language commands


[A] COMMIT [B] SAVEPOINT [C] ROLLBACK [D] All of the mentioned.

77. Data Control Language commands are


[A] ROLLBACK and COMMIT [B] SELECT and UPDATE
[C] GRANT and REVOKE [D] DROP and ALTER

7
RDBMS MCQ’s By H. P. Jain

78. Which of the following is / are the clause(s) of the SELECT statement?
[A] WHERE [B] ORDER BY [C] GROUP BY [D] All of them

79. Which of the following operator cannot be used in a sub-query?


[A] IN [B] AND [C] ANY [D] ALL

80. The subquery in SQL SELECT statements is enclosed in


[A] Parenthesis i.e. (…) [B] Brackets i.e. […] [C] Braces i.e. {…} [D] CAPITAL
letters.

81. Group of operations that forms a single logical unit of work is known as
[A] View [B] Network [C] Unit [D] Transaction

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


[A] Count [B] Compute [C] Max [D] Sum

83 What is returned by INSTR( ‘Palesha College’, ‘C’)?


[A] 8 [B] 9 [C] College [D] Palesha

84. The SQL statement


SELECT ROUND(65.726, -1) FROM dual;
prints
[A] Is illegal [B] garbage [C] 726 [D] 70

85. The SQL function used to retrieve a maximum value from a column is ______.
[A] TOP [B] MOST [C] UPPER [D] MAX

86. Which of the following is a SQL aggregate function?


[A] LEFT [B] AVG [C] LEN [D] MOD

87. Which of the following group functions ignore NULL values?


[A] MAX [B] COUNT [C] SUM [D] All of the mentioned.

88. All of the following can only be used with numeric data types except
[A] AVG [B] COUNT [C] SUM [D] MIN

89. Which character function can be used to return a specified portion of a character string?
[A] INSTR [B] SUBSTRING [C] SUBSTR [D] POS

90. Which of the following is not an aggregate function?


[A] MAX [B] MIN [C] TOTAL [D] AVG

8
RDBMS MCQ’s By H. P. Jain

91. ________ is a query that has another query embedded within it.
[A] Subquery [B] Structured Query [C] Nested Query [D] Sequence Query

92. ________ function divides one numeric expression by another and returns the remainder.
[A] POWER [B] ROUND [C] MOD [D] REMAINDER

93 Which function is used to removing all the leading and trailing blank space from the
string?
[A] TRIM [B] RTRIM [C] LTRIM [D] All of them.

You might also like