WorksheetsSEQUELVERSE
Total questions: 30
Worksheet time: 10mins
BLOB in SQL stands for?
Binary Large Object
Big Logic Object
Binary Logic Object
None of these.
Which data type of SQL is used to store a JSON object?
NVarchar
BLOB
Char
Int
SQL database follows which of the following principles?
AGILE
ACID
SQL
DBMS
What is the difference if we truncate a table and if we drop a table?
In both cases, the table is deleted.
In both cases, the data is deleted.
In truncate, the data is deleted and in drop the whole table is deleted.
In truncate, the table is deleted while when the table is dropped the data is deleted.
Below are some constraint classes of SQL given. Find the one which is not a constraint class in SQL.
UNIQUE
NOT NULL
IFNULL
NULL
Which of the following is not a built-in function in SQL?
DATE_ADD( )
DATE_SUB( )
DATE_DIFF( )
DATE_FORMAT( )
Which SQL constraint do we use to set some value to a field whose value has not been added explicitly?
UNIQUE
NOT NULL
DEFAULT
CHECK
Which of the following allows you to uniquely identify a tuple?
Schema
Attribute
Super Key
Domain
When the SQL query is executed the result is?
A blank screen
A table
A row
All of these
Which of the following is true about a cursor in SQL?
The cursor can perform all the CRUD operations.
It is read-only.
Cursors are objects of the query.
Cursors are created automatically.
Which of the below is an invalid query?
SELECT Unique(name) FROM DataFlair;
SELECT * FROM DataFlair Where experience!=0;
Select name FROM DataFlair;
None of these
Which of the following join extracts data of matching rows from both tables?
Full Outer Join
Left Join
Right Join
None of these
Which of the following shows comment in SQL?
/* This is a comment. */
# This is a comment
% This is a comment
& This is a comment
What happens when no value is inserted in an ENUM list?
nothing will happen
the code will crash
blank value is inserted
None of the above
Which of the following commands are a part of Data Control Language?
Revoke
Grant
Both A and B
None of the above
Which of the following matches the definition given below: It is an artificial key that aims to uniquely identify each record.
Primary Key
Surrogate Key
Foreign Key
Composite Key
Which of the following SQL functions compares the similarities of 2 strings and returns the result as a 4 character code?
SOUNDEX
DIFFERENCE
CONCAT
None of the above
Which of the following functions do we use to get a specified day of the month for a given date?
DAY
DATEPART
GETDATE
CURRENT_TIMESTAMP
When is the wildcard in WHERE clause used?
An exact match is necessary for a CREATE statement.
An exact match is not possible in a SELECT statement.
An exact match is necessary for a SELECT statement.
None of the above.
Which of the following is true concerning triggers?
You do not create them with SQL.
They execute against only some applications that access a database.
They have an event, condition, and action.
They cannot cascade (cause another trigger to fire).
Embedded SQL is which of the following?
The process of making an application capable of generating specific SQL code on the fly.
Hard-coded SQL statements in a program language such as Java
Hard-coded SQL statements in a procedure.
Hard-coded SQL statements in a trigger.
SELECT * FROM employees WHERE salary BETWEEN 50000 AND 70000;
What range of salaries will be included in the result?
Salaries less than 50000.
Salaries between 50000 and 70000, inclusive.
Salaries greater than 70000.
Salaries exactly equal to 50000 or 70000.
Which of the following query returns the results in ascending order of the experience column?
SELECT experience, name FROM DataFlair;
SELECT name, experience FROM DataFlair;
SELECT name, experience FROM DataFlair Order By name ASC;
SELECT experience, name FROM DataFlair Order By experience ASC;
What is the range of integers that can be held in the MEDIUMINT datatype of SQL?
Signed numbers in the range of -8388608 to 8388607.
Unsigned numbers in the range of 0 to 16777215.
Both A and B.
None of the above.
SELECT * FROM products WHERE category IN ('Electronics', 'Clothing'); What does this query return?
Products in either the 'Electronics' or 'Clothing' category
Products in both the 'Electronics' and 'Clothing' categories.
Products not in the 'Electronics' or 'Clothing' categories.
An error because of the use of the IN clause
null is used as a place holder for optional fields?
NO
YES
Database development lifecycle is very important to the successful implementation of a database system ?
NO
YES
WHERE clause is mandatory when using a SELECT command ?
NO
YES
where clause is exactly having clause ?
YES
NO
one to many relationship can only contain multiple entries of both primary and foreign keys?
NO
YES
