MCQOPTIONS
Saved Bookmarks
This section includes 155 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70F. |
| A. | SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' OR temperature > 70; |
| B. | SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' OR temperature > 70; |
| C. | SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70; |
| D. | SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70; |
| Answer» D. SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70; | |
| 52. |
In the TIMESTAMP data type, the relative value which is used to decrease or increase absolute value of time stamp is classified as |
| A. | nest position |
| B. | interval |
| C. | decimal |
| D. | notation |
| Answer» C. decimal | |
| 53. |
If a1, a2, a3 are attributes in a relation and S is another relation, which of the following is an incorrect specification of an integrity constraint? |
| A. | primary key(a1, a2, a3) |
| B. | primary key(a1) |
| C. | foreign key(a1, a2) references S |
| D. | foreign key(a1, a2) |
| Answer» E. | |
| 54. |
Choose the correct command to delete an attribute A from a relation R |
| A. | alter table R delete A |
| B. | alter table R drop A |
| C. | alter table drop A from R |
| D. | delete A from R |
| Answer» C. alter table drop A from R | |
| 55. |
If the completion of processing is to be shown then the command which is used for this purpose is called |
| A. | OPEN CURSOR command |
| B. | FETCH command |
| C. | UPDATE command |
| D. | CLOSE CURSOR command |
| Answer» E. | |
| 56. |
select distinct dept_namefrom institute;What does the above query do? |
| A. | It gives all the tuples having a distinct dept_name |
| B. | It gives the dept_name attribute values of all tuples without repetition |
| C. | It gives all the dept_name attribute of all the tuples |
| D. | It gives all the tuples having a null value under the dept_name attribute |
| Answer» C. It gives all the dept_name attribute of all the tuples | |
| 57. |
The device which scans program code and extract them from database management system for processing is classified as |
| A. | foreign processor |
| B. | secondary processor |
| C. | preprocessor |
| D. | primary processor |
| Answer» D. primary processor | |
| 58. |
The statement which is used to invoke any stored procedure is classified as |
| A. | CALL statement |
| B. | INTO statement |
| C. | ONTO statement |
| D. | FOR statement |
| Answer» B. INTO statement | |
| 59. |
The relations that are declared in SQL through CREATE TABLES statements are classified as |
| A. | ternary tables |
| B. | binary tables |
| C. | base tables |
| D. | logic tables |
| Answer» D. logic tables | |
| 60. |
The type of clause in programming which is used to specify values that are to be retrieved from the database is classified as |
| A. | INTO clause |
| B. | ONTO clause |
| C. | FOR clause |
| D. | WHILE clause |
| Answer» B. ONTO clause | |
| 61. |
What is the format of entering date into a database while inserting data into it? |
| A. | YYYY-MM-DD |
| B. | “YYYY-MM-DD” |
| C. | ‘YYYY-MM-DD’ |
| D. | “DD-MM-YYYY” |
| Answer» D. “DD-MM-YYYY” | |
| 62. |
The types of bit-string data type are |
| A. | BIT(n) |
| B. | BIT VARYING(n) |
| C. | BIT FIX(n) |
| D. | both a and b |
| Answer» E. | |
| 63. |
What will be the result of the following query? |
| A. | All the values of the studentid for which section is c and roll < 10 |
| B. | All the values of the studentid for which section is c and roll > 10 |
| C. | All the values of the studentid for which section not c and roll < 10 |
| D. | All the values of the studentid for which section not c and roll > 10 |
| Answer» C. All the values of the studentid for which section not c and roll < 10 | |
| 64. |
Choose the correct option regarding the query: |
| A. | The having clause checks whether the query result is true or not |
| B. | The having clause does not check for any condition |
| C. | The having clause allows only those tuples that have average balance 10000 |
| D. | None of the mentioned |
| Answer» D. None of the mentioned | |
| 65. |
Observe the given SQL query and choose the correct option. |
| A. | The query is syntactically correct but gives the wrong answer |
| B. | The query is syntactically wrong |
| C. | The query is syntactically correct and gives the correct answer |
| D. | The query contains one or more wrongly named clauses. |
| Answer» C. The query is syntactically correct and gives the correct answer | |
| 66. |
Observe the following query and choose the correct option. |
| A. | The query is syntactically wrong |
| B. | The query gives all the possible student names where a finite value exists for ID |
| C. | The query gives the names of the students that have a null ID and it also excludes identical names |
| D. | The query gives the student names where a finite value exists for ID and it excludes identical names |
| Answer» E. | |
| 67. |
Choose the correct option regarding the following query |
| A. | Data is inserted into the course relation |
| B. | Data is not inserted into the course relation due to incorrect specification |
| C. | Data is inserted into the CS-67 relation |
| D. | Data is not inserted due to the incorrect use of syntax |
| Answer» E. | |
| 68. |
What is the result of the following query? |
| A. | The query deletes all the tuples whose marks are greater than the average marks |
| B. | The query deletes all the tuples whose marks are less than the average marks |
| C. | The query deletes all the values under the marks attribute which are less than the average |
| D. | The query is syntactically wrong and does not execute |
| Answer» C. The query deletes all the values under the marks attribute which are less than the average | |
| 69. |
Choose the correct option regarding the following query: |
| A. | The query is syntactically wrong |
| B. | The query gives the studentID of the student with the maximum marks |
| C. | The query gives the maximum marks amongst all the students |
| D. | The query gives all the studentID values except the student with the maximum marks |
| Answer» C. The query gives the maximum marks amongst all the students | |
| 70. |
What does the following query do? |
| A. | It increases the marks of all the students by 10% |
| B. | It decreases the marks of all the students by 90% |
| C. | It increases the marks of all the students by 110% |
| D. | It is syntactically wrong |
| Answer» B. It decreases the marks of all the students by 90% | |
| 71. |
Insert the appropriate key word in the blank in the query ( A is a relation)delete ______ Awhere P < 5; |
| A. | all |
| B. | from |
| C. | with |
| D. | in |
| Answer» B. from | |
| 72. |
In SQL, the constraints, constructs, views, domains and tables are classified as its |
| A. | elements |
| B. | declaration |
| C. | interpreters |
| D. | descriptors |
| Answer» B. declaration | |
| 73. |
Which of the following cannot be used to modify the data in a database |
| A. | update |
| B. | insert |
| C. | delete |
| D. | drop |
| Answer» E. | |
| 74. |
The command to eliminate a row from a table is: |
| A. | REMOVE FROM CUSTOMER |
| B. | DROP FROM CUSTOMER |
| C. | DELETE FROM CUSTOMER |
| D. | UPDATE FROM CUSTOMER |
| Answer» D. UPDATE FROM CUSTOMER | |
| 75. |
Which of the following is the correct processing order for SQL SELECT statements? |
| A. | SELECT, FROM, WHERE |
| B. | FROM, WHERE, SELECT |
| C. | WHERE, FROM,SELECT |
| D. | SELECT,WHERE,FROM |
| Answer» C. WHERE, FROM,SELECT | |
| 76. |
Find the SQL statement below that is equal to the following:SELECT NAME FROM CUSTOMER WHERE STATE = 'VA'; |
| A. | SELECT NAME IN CUSTOMER WHERE STATE IN ('VA'); |
| B. | SELECT NAME IN CUSTOMER WHERE STATE = 'VA'; |
| C. | SELECT NAME IN CUSTOMER WHERE STATE = 'V'; |
| D. | SELECT NAME FROM CUSTOMER WHERE STATE IN ('VA'); |
| Answer» E. | |
| 77. |
In database management systems, the record which contains all the information needed for one statement of standard query language is called |
| A. | statement record |
| B. | environment record |
| C. | description record |
| D. | connection record |
| Answer» B. environment record | |
| 78. |
The data type DATE consists of ten positions where as the data type TIME consists of |
| A. | four positions |
| B. | five positions |
| C. | eight positions |
| D. | ten positions |
| Answer» D. ten positions | |
| 79. |
The wildcard in a SELECT statement is which of the following? |
| A. | % |
| B. | & |
| C. | ∗ |
| D. | # |
| Answer» D. # | |
| 80. |
Which of the following function cannot be performed by SQL ? |
| A. | Setting permissions on tables |
| B. | Creating views in a database |
| C. | Updating records |
| D. | Creating Complex UI |
| Answer» E. | |
| 81. |
_____________ function divides one numeric expression by another and returns the remainder. |
| A. | POWER |
| B. | MOD |
| C. | ROUND |
| D. | REMAINDER |
| Answer» C. ROUND | |
| 82. |
The ______ operator is used to compare a value to a list of literals values that have been specified. |
| A. | BETWEEN |
| B. | ANY |
| C. | IN |
| D. | ALL |
| Answer» B. ANY | |
| 83. |
The statement in SQL which allows to change the definition of a table is |
| A. | Alter |
| B. | Update |
| C. | Create |
| D. | Select |
| Answer» B. Update | |
| 84. |
_________ is a virtual table that draws its data from the result of an SQL SELECT statement. |
| A. | View |
| B. | Synonym |
| C. | Sequence |
| D. | Transaction |
| Answer» B. Synonym | |
| 85. |
Structured Query Language is an __________ Standard. |
| A. | ISO |
| B. | Hall Mark |
| C. | ANSI |
| D. | Agmark |
| Answer» D. Agmark | |
| 86. |
Which of the following is a legal expression in SQL? |
| A. | SELECT NULL FROM EMPLOYEE; |
| B. | SELECT NAME FROM EMPLOYEE; |
| C. | SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL; |
| D. | None of the above |
| Answer» C. SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL; | |
| 87. |
An ________ on an attribute of a relation is a data structure that allows the database system to find those tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the tuples of the relation. |
| A. | Index |
| B. | Reference |
| C. | Assertion |
| D. | Timestamp |
| Answer» B. Reference | |
| 88. |
We can test for the nonexistence of tuples in a subquery by using the _____ construct. |
| A. | Not exist |
| B. | Not exists |
| C. | Exists |
| D. | Exist |
| Answer» C. Exists | |
| 89. |
Which of the following closely resembles Create view ? |
| A. | Create table . . .like |
| B. | Create table . . . as |
| C. | With data |
| D. | Create view as |
| Answer» C. With data | |
| 90. |
Which of the following is used to store movie and image files ? |
| A. | Clob |
| B. | Blob |
| C. | Dlob |
| D. | None of the above |
| Answer» C. Dlob | |
| 91. |
Which of the following statements creates a new table temp instructor that has the same schema as instructor. |
| A. | create table temp_instructor; |
| B. | Create table temp_instructor like instructor; |
| C. | Create Table as temp_instructor; |
| D. | Create table like temp_instructor; |
| Answer» C. Create Table as temp_instructor; | |
| 92. |
The____condition allows a general predicate over the relations being joined. |
| A. | On |
| B. | Using |
| C. | Set |
| D. | Where |
| Answer» B. Using | |
| 93. |
The language which has recently become the defacto standard for interfacing application programs with relational database system is |
| A. | Oracle |
| B. | SQL |
| C. | DBase |
| D. | 4GL |
| Answer» C. DBase | |
| 94. |
Which of the join operations do not preserve non matched tuples. |
| A. | Left outer join |
| B. | Right outer join |
| C. | Inner join |
| D. | None of the above |
| Answer» D. None of the above | |
| 95. |
Which join refers to join records from the right table that have no matching key in the left table are include in the result set: |
| A. | Left outer join |
| B. | Right outer join |
| C. | Full outer join |
| D. | Half outer join |
| Answer» C. Full outer join | |
| 96. |
What are the after triggers ? |
| A. | Triggers generated after a particular operation |
| B. | These triggers run after an insert, update or delete on a table |
| C. | These triggers run after an insert, views, update or delete on a table |
| D. | Both b and c |
| Answer» C. These triggers run after an insert, views, update or delete on a table | |
| 97. |
Which join condition contains an equality operator: |
| A. | Equijoins |
| B. | Cartesian |
| C. | Natural |
| D. | Left |
| Answer» B. Cartesian | |
| 98. |
____________ is preferred method for enforcing data integrity. |
| A. | Constraints |
| B. | Stored Procedure |
| C. | Triggers |
| D. | Cursors |
| Answer» B. Stored Procedure | |
| 99. |
To include integrity constraint in a existing relation use : |
| A. | Create table |
| B. | Modify table |
| C. | Alter table |
| D. | Any of the above |
| Answer» D. Any of the above | |
| 100. |
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 |
| Answer» E. | |