Please login

Prime

Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

IBM SQL Query Quiz-1

Question 1

Time: 00:00:00
The query given below will not give an error. Which one of the following has to be replaced to get the desired output?







SELECT ID, name, dept name, salary * 1.1


WHERE instructor;









Salary*1.1

Salary*1.1

ID

ID

Where

Where

Instructor

Instructor

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
This Query can be replaced by which one of the following?







SELECT name, course_id


FROM instructor, teaches


WHERE instructor_ID= teaches_ID;









Select name,course_id from teaches,instructor where instructor_id=course_id;

Select name,course_id from teaches,instructor where instructor_id=course_id;

Select name, course_id from instructor natural join teaches;

Select name, course_id from instructor natural join teaches;

Select name, course_id from instructor;

Select name, course_id from instructor;

Select course_id from instructor join teaches;

Select course_id from instructor join teaches;

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Which of the following statements contains an error?

Select * from emp where empid = 10003;

Select * from emp where empid = 10003;

Select empid from emp where empid = 10006;

Select empid from emp where empid = 10006;

Select empid from emp;

Select empid from emp;

Select empid where empid = 1009 and lastname = ‘GELLER’; View Answer

Select empid where empid = 1009 and lastname = ‘GELLER’; View Answer

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
In the given query which of the keyword has to be inserted?







INSERT INTO employee _____ (1002,Joey,2000);









Table

Table

Values

Values

Relation

Relation

Field

Field

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Consider the following set of relations

EMP ( emp_no,emp_name,dept_no,salary)
DEPT (dept_no,dept_name,location)
Write SQL query for the following
Find all the employees whose departments are located in 'Mumbai' and salary is greater than Rs. 20,000.

select emp_name from dept where dept_no and location='Mumbai';

select emp_name from dept where dept_no and location='Mumbai';

select emp_name from emp where salary > 20,000 and dept_no in (select dept_no from dept where location = 'Mumbai');

select emp_name from emp where salary > 20,000 and dept_no in (select dept_no from dept where location = 'Mumbai');

select dept_no ,count(emp_no) from emp where salary > 50,000 group by dept_no;

select dept_no ,count(emp_no) from emp where salary > 50,000 group by dept_no;

update table emp where emp_name='Mumbai';

update table emp where emp_name='Mumbai';

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
What is the purpose of the SQL AS clause?

The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

The AS clause is used with the JOIN clause only

The AS clause is used with the JOIN clause only

The AS clause defines a search condition

The AS clause defines a search condition

All of the mentioned

All of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
In SQL Aliases are defined for columns and tables. Basically aliases are created to make the column selected more readable.

ALTER TABLE

ALTER TABLE

MODIFY TABLE

MODIFY TABLE

CHANGE TABLE

CHANGE TABLE

All of the above

All of the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
which of the SQL Statement is correct?

SELECT Username, AND Password FROM Users

SELECT Username, AND Password FROM Users

SELECT Username,Password from Users

SELECT Username,Password from Users

SELECT Username,Password WHERE Username='user1'

SELECT Username,Password WHERE Username='user1'

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
The FROM SQL clause is used to

Specify what table we are selecting or deleting data FROM

Specify what table we are selecting or deleting data FROM

specify range for search condition

specify range for search condition

specify search condition

specify search condition

None of these

None of these

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
What is an SQL Virtual Table that is constructed from other tables?

view

view

A relation

A relation

Just another table

Just another table

Query results

Query results

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Completed

0/0

Accuracy

0%

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%