A Learning Portal from Recruitment India
______ clause creates temporary relation for the query on which it is defined.
SELECT
WITH
WHERE
FROM
Answer with explanation
Answer: Option BExplanation
The WITH clause in SQL allows us to provide a sub-query block, a name that can be referenced in several places within the main query. It is used for defining a temporary relation whose definition is available by the query in which the WITH clause is associated.
Workspace
Which operator is used to compare a value to a specified list of values?
IN
ALL
BETWEEN
ANY
Answer with explanation
Answer: Option AExplanation
The correct answer is IN
The IN operator easily tests the expression if it matches any value in a specified list of values. It reduces the use of multiple OR conditions.
The WHERE or HAVING clause uses the ANY and ALL operators. ANY gives the result when any subquery value matches the specified condition. The ALL give the result when all subquery values match the specified condition.
The BETWEEN operator selects values only in the given range.
Workspace
SQL Views are also known as?
Actual Tables
Complex tables
Virtual tables
Simple tables
Answer with explanation
Answer: Option CExplanation
A view is also known as a virtual table because it contains rows and columns similar to a real table. It shows the table interface but cannot be stored in a database.
Workspace
Which of the following are TCL commands?
GRANT and REVOKE
SELECT and INSERT
UPDATE and TRUNCATE
COMMIT and ROLLBACK
Answer with explanation
Answer: Option DExplanation
The correct answer is COMMIT and ROLLBACK
TCL stands for Transaction Control Commands used for managing the changes made by DML commands like INSERT, DELETE, and UPDATE. The TCL commands are automatically committed in the database; that’s why we cannot use them directly while creating tables or dropping them.
Workspace
Which of the following is not a valid SQL type?
CHARACTER
DECIMAL
NUMERIC
FLOAT
Answer with explanation
Answer: Option BExplanation
The correct answer is DECIMAL
DECIMAL is not a valid SQL type because it is nothing but numeric only in SQL.
NUMERIC has fixed precision, and scale numbers range from -10^38+1 to 10^38-1.
FLOAT has floating precision number ranges from -1.79E + 308 to 1.79E + 308.
CHARACTER is a fixed-width character string data type that can be up to 8000 characters.
Workspace
The program called MySQL is ……
A Client Program That Lets You Send SQL Commands To The Database Engine
There Isn’t A Program Just Called Mysql
The Database Engine
None of Above
Answer with explanation
Answer: Option AExplanation
The correct answer is A Client Program That Lets You Send SQL Commands To The Database Engine
Workspace
If you want to undo a grant you should use ……..
REVOKE
UNGRANT
DELETE
UNDO
Answer with explanation
Answer: Option AExplanation
The REVOKE statement can be used to undo the action of a GRANT statement. It revokes a privilege from a grantee, but only if that exact privilege was granted to the same grantee before.
Workspace
Which of the following is available in MySQL?
CREATE DATABASE
CREATE SCHEMA
CREATE TRIGGER
CREATE VIEW
Answer with explanation
Answer: Option AExplanation
Create Database. Because MySQL is an open-sourced RDBMS or Relational Database Management System. So, in MySQL, you could create a Database
Workspace
Which of these commands will delete a table called XXX if you have appropriate authority:
DELETE TABLE XXX
DELETE TABLE XXX
DROP TABLE XXX
DROP XXX WHERE confirm = “YES”
Answer with explanation
Answer: Option CExplanation
The correct answer is DROP TABLE XXX
Workspace
Commands passed to the MySQL daemon are written in?
Swedish
the Structured Query Language
English
Your choice from Perl, PHP, Java, or some other languages
Answer with explanation
Answer: Option BExplanation
The correct answer is the Structured Query Language
Workspace
To use MySQL on your computer, you’ll need?
FTP and Telnet
A Browser
Some sort of client program to access the databases
Perl, PHP, or Java
Answer with explanation
Answer: Option CExplanation
The correct answer is Some sort of client program to access the databases
Workspace
Which Is The Log In Which Data Changes Received From A Replication Master Server Are Written?
Relay Log
General Query Log
Binary Log
Error Log
Answer with explanation
Answer: Option AExplanation
The Relay Log has the data changes received from a replication master server written in it. The problems encountered during the starting, running, or stopping of ‘mysqld’ are written in the error log.
Workspace
The Function ‘fetchrow_hashref()’ Returns Reference To Hash Of Row Values Keyed By ____
Database Name
Table Name
Column Name
Row Name
Answer with explanation
Answer: Option CExplanation
The function ‘fetchrow_hashref()’ returns a reference to a hash of row values, keyed by the column name.
Workspace
Which Program Copies The Databases From One Server To Another?
Mysqldbflush
Mysqlflushdb
Mysqldbcopy
Mysqlcopydb
Answer with explanation
Answer: Option BExplanation
The utility program ‘mysqldbcopy’ is capable of copying databases from one server to another server. It can also prepare copies to make transfers on the same servers.
Workspace