Questions

M.C.Q

🎯

Test yourself on this topic

42 questions · timed · auto-graded

MCQ 21 Mark
The join in which all the rows from the right table appear in the output irrespective of the content of the other table is $........$
  • A
    $\text{CARTESIAN JOIN}$
  • B
    $\text{CROSS JOIN}$
  • C
    $\text{INNER JOIN}$
  • $\text{RIGHT JOIN}$
Answer
Correct option: D.
$\text{RIGHT JOIN}$
View full question & answer
MCQ 31 Mark
The string function that returns the index of the first occurrence of substring is _____________
  • A
    INSERT()
  • INSTR()
  • C
    INSTRING()
  • D
    INFSTR()
Answer
Correct option: B.
INSTR()
B
View full question & answer
MCQ 41 Mark
If emp_id contain the following set {9, 7, 6, 4, 3, 1, 2}, what will be the output on execution of the given query?

  • {9, 7, 6, 4, 3, 1, 2}
  • B
    {1, 2, 3, 4, 6, 7 , 9}
  • C
    {2, 1, 3, 4, 6, 7, 9}
  • D
    None of the mentioned
Answer
Correct option: A.
{9, 7, 6, 4, 3, 1, 2}
A
View full question & answer
MCQ 51 Mark
Which clause is used with an "aggregate functions"?
  • A
    GROUP BY
  • B
    SELECT
  • C
    WHERE
  • Both a and c
Answer
Correct option: D.
Both a and c
D
View full question & answer
MCQ 61 Mark
"COUNT" keyword belongs to which categories in MySQL?
  • Aggregate functions
  • B
    Operators
  • C
    Clauses
  • D
    All of the mentioned
Answer
Correct option: A.
Aggregate functions
A
View full question & answer
MCQ 71 Mark
When do we use a HAVING clause?
  • A
    To limit the output of a query
  • To limit the output of a query using an aggregate function only
  • C
    When GROUP by is used
  • D
    Both a and c above
Answer
Correct option: B.
To limit the output of a query using an aggregate function only
B
View full question & answer
MCQ 81 Mark
How do I find out all databases starting with `test to which I have access to?
  • A
    SHOW DATABASES AS `%test%`;
  • B
    SHOW DATABASES LIKE `%test;
  • C
    SHOW DATABASES LIKE `’test’%’;
  • SHOW DATABASES LIKE `%test%’;
Answer
Correct option: D.
SHOW DATABASES LIKE `%test%’;
D
View full question & answer
MCQ 91 Mark
$\text{USE}$ keyword is used to select a $........$
  • A
    Table
  • B
    Column
  • Database
  • D
    All of the above
Answer
Correct option: C.
Database
View full question & answer
MCQ 101 Mark
Which of the following ways below are the correct way to get the current date?
  • A
    SELECT CURTIME();
  • B
    SELECT CURDATE();
  • C
    SLELCT CURRRENT_TIME()
  • All of the above
Answer
Correct option: D.
All of the above
D
View full question & answer
MCQ 111 Mark
How can we get the number of records or rows in a table?
  • Using COUNT
  • B
    Using NUM
  • C
    Using NUMBER
  • D
    Both a and c above
Answer
Correct option: A.
Using COUNT
A
View full question & answer
MCQ 131 Mark
Which is the default order of sort in ORDER BY clause?
  • Ascending
  • B
    Descending
Answer
Correct option: A.
Ascending
A
View full question & answer
MCQ 141 Mark
What is a candidate key?
  • Used to uniquely identify a row
  • B
    Alias for primary key
  • C
    Used to identify a column
  • D
    Alias for foreign key
Answer
Correct option: A.
Used to uniquely identify a row
View full question & answer
MCQ 151 Mark
On executing DELETE command, if you get an error "foreign key constraint" – what does it imply?
  • A
    Foreign key not defined
  • B
    Table is empty
  • C
    Connectivity issue
  • Data is present in the other table
Answer
Correct option: D.
Data is present in the other table
D
View full question & answer
MCQ 161 Mark
How much storage space does DATETIME require?
  • A
    4 bytes
  • B
    2 bytes
  • 8 bytes
  • D
    1 bytes
Answer
Correct option: C.
8 bytes
C
View full question & answer
MCQ 181 Mark
Which SQL statement is used to create a table in a database?
  • A
    MAKE TABLE
  • CREATE TABLE
  • C
    BUILD TABLE
  • D
    No of the above
Answer
Correct option: B.
CREATE TABLE
B
View full question & answer
MCQ 191 Mark
Which operator is used to search for a specified pattern in a column?
  • LIKE
  • B
    GET
  • C
    FROM
  • D
    BETWEEN
Answer
Correct option: A.
LIKE
A
View full question & answer
MCQ 201 Mark
Which operator is used to select values within a range?
  • BETWEEN
  • B
    WITHIN
  • C
    RANGE
  • D
    IN
Answer
Correct option: A.
BETWEEN
A
View full question & answer
MCQ 211 Mark
What is the most common type of join?
  • INNER JOIN
  • B
    INSIDE JOIN
  • C
    JOINED TABLE
  • D
    JOINED
Answer
Correct option: A.
INNER JOIN
A
View full question & answer
MCQ 221 Mark
Which SQL keyword is used to sort the result-set?
  • ORDER BY
  • B
    SORT BY
  • C
    SORT
  • D
    ORDER
Answer
Correct option: A.
ORDER BY
A
View full question & answer
MCQ 231 Mark
Which SQL statement is used to return only different values?
  • SELECT DISTINCT
  • B
    SELECT UNIQUE
  • C
    SELECT DIFFERENT
  • D
    SELECT REMOVE DUPLICATE
Answer
Correct option: A.
SELECT DISTINCT
A
View full question & answer
MCQ 241 Mark
Which SQL statement is used to delete data from a database?
  • DELETE
  • B
    REMOVE
  • C
    COLLAPSE
  • D
    Drop
Answer
Correct option: A.
DELETE
A
View full question & answer
MCQ 251 Mark
Which SQL statement is used to manipulate data in a database?
  • UPDATE
  • B
    SAVE
  • C
    SAVE AS
  • D
    MODIFY
Answer
Correct option: A.
UPDATE
A
View full question & answer
MCQ 261 Mark
Which SQL statement is used to extract data from a database?
  • SELECT
  • B
    OPEN
  • C
    GET
  • D
    EXTRACT
Answer
Correct option: A.
SELECT
A
View full question & answer
MCQ 271 Mark
What does SQL stand for?
  • Structured Query Language
  • B
    Strong Question Language
  • C
    Structured Question Language
  • D
    Storing Query Language
Answer
Correct option: A.
Structured Query Language
A
View full question & answer
MCQ 281 Mark
Which command is used to remove all rows from a table?
  • Delete
  • B
    Truncate
  • C
    Remove
  • D
    Both A & B
Answer
Correct option: A.
Delete
A
View full question & answer
MCQ 291 Mark
Which of the following is an aggregate function in MYSQL?
  • A
    LIKE
  • B
    Union
  • C
    Group by
  • MAX
Answer
Correct option: D.
MAX
D
View full question & answer
MCQ 301 Mark
The SQL keyword between is used?
  • A
    To limit the columns displayed
  • B
    As a wildcard
  • For ranges
  • D
    None of the above
Answer
Correct option: C.
For ranges
C
View full question & answer
MCQ 311 Mark
Which statement is used to insert a new data in a database?
  • A
    Insert new
  • B
    Add row
  • Insert into
  • D
    Update
Answer
Correct option: C.
Insert into
C
View full question & answer
MCQ 331 Mark
In a like clause, you can ask for any 4-letter value by writing:
  • A
    LIKE.{4}
  • LIKE ____ (that's four underscore characters)
  • C
    LIKE ^.{6}$
  • D
    LIKE %%%%
Answer
Correct option: B.
LIKE ____ (that's four underscore characters)
B
View full question & answer
MCQ 341 Mark
Which of these commands will delete a table called ABC, if you have appropriate authority?
  • Drop table ABC;
  • B
    Delete ABC where confirm=" Yes";
  • C
    Drop ABC;
  • D
    Drop ABC where confirm="YES";
Answer
Correct option: A.
Drop table ABC;
A
View full question & answer
MCQ 351 Mark
The "father" of MYSQL is ______.
  • A
    Bill Joy
  • Michael Widenius
  • C
    Bill Gates
  • D
    Stephanie Wall
Answer
Correct option: B.
Michael Widenius
B
View full question & answer
MCQ 361 Mark
The maximum length of the varchar columns is
  • Upto 65,535 Bytes
  • B
    Upto 256 Bytes
  • C
    Upto 65,567 Bytes
  • D
    None of the above
Answer
Correct option: A.
Upto 65,535 Bytes
A
View full question & answer
MCQ 371 Mark
The maximum length of the char columns is
  • A
    65,535 Bytes
  • B
    256 Bytes
  • 255 Bytes
  • D
    None of the above
Answer
Correct option: C.
255 Bytes
C
View full question & answer
MCQ 381 Mark
Which declaration doesn't use the same number of bytes and consumption of bytes depends on the input data?
  • Varchar
  • B
    Char
  • C
    Both Varchar and char
  • D
    None of the above
Answer
Correct option: A.
Varchar
A
View full question & answer
MCQ 391 Mark
Character data can be stored as
  • Either fixed or Variable length String
  • B
     Fixed length string
  • C
    Variable length string
  • D
    None of the above
Answer
Correct option: A.
Either fixed or Variable length String
A
View full question & answer
MCQ 411 Mark
Which clause is used to group the column(s) with aggregate function?
  • A
    Order by
  • B
    Like
  • C
    Where
  • Group by
Answer
Correct option: D.
Group by
D
View full question & answer
M.C.Q - Computer Science STD 12 Humanities Questions - Vidyadip