
SQL

Quiz
•
Computers
•
University - Professional Development
•
Hard

Muralidhara Srirama
Used 49+ times
FREE Resource
28 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 1 pt
ALTER TABLE TABELNAME CHANGE
NEWCOLNAME NEWDATATYPE
NEWCOLNAME OLDDATATYPE
OLDCOLNAME NEWCOLNAME NEWDATATYPE
OLDCOLNAME NEWCOLNAME OLDDATATYPE
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is def in the following statement?
CREATE TRIGGER abc (...) (...) ON def FOR EACH ROW ghi;
trigger name
table name
trigger statement
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The salary of managers has been increased by 20%. Retrieve the empid, existing salary as "Current Salary", increased salary as "New Salary" and the difference of existing and increased salary as "Incremented Amount". Round off the increased salary up to two decimal places.
select empid,round(salary,0) as "Current Salary", round(salary*1.20,2) as "New Salary",round(salary*0.20,2) as "Incremented Amount" from empdetails where Designation='Manager';
select empid,round(salary,2) as "Current Salary", round(salary*0.20,2) as "New Salary",round(salary*0.20,2) as "Incremented Amount" from empdetails where Designation='Manager';
select empid,round(salary,2) as "Current Salary", round(salary*1.20,2) as "New Salary",round(salary*0.20,2) as "Incremented Amount" from empdetails where Designation='Manager';
select empid,round(salary,2) as "Current Salary", round(salary*1.20,2) as "New Salary",round(salary*1.20,2) as "Incremented Amount" from empdetails where Designation='Manager';
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Display the itemcode of those items where the difference of quantity on hand and reorder level is more than 50. Convert the result of difference to positive values.
Select itemcode from item where abs(Qtyonhand-reorderlevel)>=50;
Select itemcode from item where round(Qtyonhand-reorderlevel)>=50;
Select itemcode from item where Qtyonhand-reorderlevel>50;
Select itemcode from item where abs(Qtyonhand-reorderlevel)>50;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the itemcode and average of quantity available in retail outlets where the average of quantity available is less than 75.
select itemcode,avg(qtyavailable) "Average Quantity" from retailstock group by itemcode having avg(qtyavailable)>75;
select itemcode,avg(qtyavailable) "Average Quantity" from retailstock group by itemcode having count(qtyavailable)<75;
select itemcode,avg(qtyavailable) "Average Quantity" from retailstock group by itemcode having avg(qtyavailable)<75;
select itemcode,avg(qtyavailable) "Average Quantity" from retailstock group by itemcode having avg(qtyavailable)<=75;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Display pymtmode, and total number of payments for those payments which were paid before the year 2015 and total number of payments should be more than 1.
select pymtmode,sum(pymtmode) as PYMTCOUNT from orders where extract(year from pymtdate)<2015 group by pymtmode having count(pymtmode)>1;
select pymtmode,count(pymtmode) as PYMTCOUNT from orders where extract(year from pymtdate)<2015 group by pymtmode having count(pymtmode)>1;
select pymtmode,count(pymtmode) as PYMTCOUNT from orders where extract(year from pymtdate)<2015 group by pymtmode having count(pymtmode)>=1;
select pymtmode,count(pymtmode) as PYMTCOUNT from orders where extract(year from pymtdate)<=2015 group by pymtmode having count(pymtmode)>1;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Retrieve the itemcode, descr and unit price of the items which have 'Shirt' or 'Skirt' in their desc and their category is 'B'.
select Itemcode,Descr,Price from Item where (Descr LIKE '%Shirt%' or Descr LIKE '%Skirt%') and Category='B';
select Itemcode,Descr,Price from Item where (Descr LIKE '%Shirt%' or Descr LIKE '%Skirt%') and Category<='B';
select Itemcode,Descr,Price from Item where (Descr LIKE '%Shirt%' or Descr LIKE '%Skirt%') and Category<>'B';
select Itemcode,Descr,Price from Item where (Descr LIKE '%Shirt%' or Descr LIKE '%Skirt%') and Category lIKE 'B';
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Women Gyani Quiz Competation -2024

Quiz
•
Professional Development
30 questions
Data Analysis with Python 1

Quiz
•
University
30 questions
DBMS

Quiz
•
University
25 questions
Query database aset

Quiz
•
University
30 questions
SQL-ə Giriş və Verilənlər Bazası Əsasları (51 - 80)

Quiz
•
Professional Development
30 questions
SQL Queries Practical

Quiz
•
University
29 questions
SQL Basics

Quiz
•
University
25 questions
Database Management System

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
How to Email your Teacher

Quiz
•
Professional Development
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University