Infytq DBMS Questions and Answers 2023: In this article, we will be discussing some important Infytq DBMS Questions and Answers which will help you guys to crack Infytq 2023 exam.
So, If you are also preparing for Infytq exam, Must prepare these questions.
Also check Infytq Detailed Exam Pattern, Click here
Question 16: Consider the tables salesinformation given below:
Table: salesinformation
region | salesman | sales |
---|---|---|
North | James | 800000 |
West | Alan | 760000 |
West | David | 350000 |
East | John | 124000 |
North | Nolan | 590000 |
South | Nick | 235000 |
East | Nicholas | 145000 |
Katie and Lisa have written queries to get the below desired output:
region | salesman | sales |
---|---|---|
West | Alan | 760000 |
East | John | 124000 |
East | Nicholas | 145000 |
Katie’s Query:
SELECT * FROM salesinformation WHERE (LOWER(region) LIKE ‘%t’ AND (UPPER(salesman) LIKE ‘%N’ OR UPPER(salesman) LIKE ‘N%’)) ;
Lisa’s Query:
SELECT * FROM salesinformation WHERE (LOWER(region) LIKE ‘%th’ OR (UPPER(salesman) LIKE ‘%N’ AND UPPER(salesman) LIKE ‘N%’)) ;
Whose query will generate the desired output?
A. Both Lisa’s and Katie’s
B. Neither Lisa’s nor Katie’s
C. Only Katie’s
D. Only Lisa’s
Answer: Option C
Explanation: Among Kaite and Lisa, Kaite’s query is correct.
Question 17: Consider the tables given below:
Table – EmployeeDetails
EmpId | FullName | ManagerId | DateOfJoining | City |
---|---|---|---|---|
121 | John Snow | 321 | 01/31/2014 | Toronto |
321 | Walter White | 986 | 01/30/2015 | California |
421 | Kuldeep Rana | 876 | 27/11/2016 | New Delhi |
Table – EmployeeSalary
EmpId | Project | Salary | Variable |
---|---|---|---|
121 | P1 | 8000 | 500 |
321 | P2 | 10000 | 1000 |
421 | P1 | 12000 | 0 |
Nipun’s Query:
SELECT EmpId, Salary FROM EmployeeSalary WHERE Salary BETWEEN 9000 AND 15000;
Umang’s Query:
SELECT EmpId, Salary IN EmployeeSalary WHERE Salary 9000 AND 15000;
Whose query will find the employee id whose salary lies in the range of 9000 and 15000.?
A. Both Nipun’s and Umang’s
B. Neither Nipun’s nor Umang’s
C. Only Nipun’s
D. Only Umang’s
Answer: Option C
Explanation: we can use the ‘Between’ operator with a where clause.
Question 18: Consider the tables given below:
Id | name | gender | doj | dob | mobnumber |
1001 | Kristen | F | 16 Aug 2021 | 10 Aug 1998 | 98657257 |
1002 | Amy | M | 11 Jan 2020 | 2 March 1997 | NULL |
1003 | Evan | F | 1 May 2021 | 9 Oct 1999 | NULL |
1004 | Robert | M | 1 April 2020 | 16 Jan 1998 | 28653892 |
Query :
UPDATE consultant SET mobnumber = 98765849 WHERE id = 1003;
UPDATE consultant SET name = ‘Batron’ WHERE id = 1004;
DELETE FROM consultant WHERE gender = ‘M’
SELECT name, gender, mobnumber FROM consultant;
What will be the output when the above statements are executed sequentially ?
A.
name | gender | mobnumber |
Kristen | F | 98657257 |
Amy | M | NULL |
B.
name | gender | mobnumber |
Kristen | F | 98657257 |
Evan | F | NULL |
C.
name | gender | mobnumber |
Kristen | F | 98657257 |
Evan | F | 98765849 |
D. None of the above
Answer: Option C is correct.