ExamVeda
Login
Home
1
What is the full form of SQL?
Discuss
Answer & Solution
Answer: Option A
Solution:

SQL (Structured Query Language) is a special-purpose programming language designed for managing data held in a relational database management system (RDBMS).
Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language and a data manipulation language. The scope of SQL includes data insert, query, update and delete, schema creation and modification, and data access control.

2
Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
Discuss
Answer & Solution
Answer: Option A
Solution:
Data Definition Language, represented by DDL, is the subset of SQL commands used to manipulate Oracle Database structures, including tables. DDL commands are responsible for defining, modifying, and deleting the structure of a database, such as creating and altering tables, defining constraints, and managing indexes. They do not deal with the actual data within the tables, which is the primary function of Data Manipulation Language (DML) commands. So, Option A is the correct answer.

CREATE, ALTER, RENAME, DROP and TRUNCATE statements are the names of few data definition elements.
3
Which operator performs pattern matching?
Discuss
Answer & Solution
Answer: Option B
Solution:

LIKE is a keyword that is used in the WHERE clause. Basically, LIKE allows us to do a search based operation on a pattern rather than specifying exactly what is desired (as in IN) or spell out a range (as in BETWEEN).

The syntax is as follows:
SELECT "column_name"
FROM "table_name"
WHERE "column_name" LIKE {PATTERN}

{PATTERN} often consists of wildcards. In SQL, there are two wildcards:

  • 1=% (percent sign) represents zero, one, or more characters.
  • 2=_ (underscore) represents exactly one character.
4
What operator tests column for the absence of data?
Discuss
Answer & Solution
Answer: Option C
Solution:

Always use IS NULL to look for NULL values.

Syntax:

SELECT "column_name"
FROM "table_name"
WHERE "column_name" IS NULL

5
In SQL, which command(s) is(are) used to change a table's storage characteristics?
Discuss
Answer & Solution
Answer: Option A
Solution:

To change the structure of the table we use ALTER TABLE.
Sytax:
ALTER TABLE "table_name"
ADD "column_name" datatype

OR

ALTER TABLE "table_name"
DROP COLUMN "column_name"
etc..

6
In SQL, which of the following is not a data definition language commands?
Discuss
Answer & Solution
Answer: Option D
Solution:

RENAME: - With RENAME statement you can rename a table.
REVOKE: - The REVOKE command removes user access rights or privileges to the database objects.
GRANT: - In SQL GRANT is a command used to provide access or privileges on the database objects to the users.
UPDATE: - The UPDATE Statement is used to modify the existing rows in a table.

RENAME, REVOKE and GRANT are DDL(Data Definition Language) commands and UPDATE is DML(Data Manipulation Language) command.

7
In SQL, which command is used to SELECT only one copy of each set of duplicable rows
Discuss
Answer & Solution
Answer: Option A
Solution:

The SELECT keyword allows us to grab all information from a column (or columns) on a table. This, of course, necessarily means that there will be redundancies. What if we only want to select each distinct element? This is easy way to accomplish in SQL. All we need to do is that to add DISTINCT after SELECT. The syntax is as follows:

SELECT DISTINCT column_name
FROM table_name;

8
A command that lets you change one or more fields in a record is
Discuss
Answer & Solution
Answer: Option B
Solution:

Sometimes we need to change the data type of a column. To do this, we use the ALTER TABLE Modify Column command.
Sytax:
ALTER TABLE table_name
MODIFY column_name "New Data Type"

9
Which of the SQL statements is correct?
Discuss
Answer & Solution
Answer: Option B
Solution:

Correct order of SELECT, FROM and WHERE clause is as follow:
SELECT column_name1, column_name2, ....
FROM table_name
WHERE condition

So, only
SELECT Username, Password FROM Users
follows the above syntax.

10
The FROM SQL clause is used to...
Discuss
Answer & Solution
Answer: Option A
Solution:
The FROM SQL clause is used to specify from which table we are selecting or deleting data. It defines the source table from which data will be retrieved or modified in a SQL query. Here's the breakdown:

Option A: specify what table we are selecting or deleting data FROM
This option correctly describes the purpose of the FROM clause, which is to specify the table from which data operations will be performed.

Option B: specify range for search condition
This is not the primary purpose of the FROM clause. It is used for table specification, not defining search ranges.

Option C: specify search condition
The FROM clause is not used to specify search conditions. Search conditions are typically defined in the WHERE clause.

Option D: None of these
Option A is a valid description of the FROM clause's purpose.

So, the correct answer is Option A: specify what table we are selecting or deleting data FROM.