SQL Programming Language
Description: This test consists of questions related to SQL queries and programming, which is useful for CS and Gate students. | |
Number of Questions: 17 | |
Created by: Anumati Koshy | |
Tags: SQL database CS Gate SQL questions Database questions practice DB interview questions Database |
Attempted
0/17
Correct 0
Score 0
‹
›
Consider the following table:
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Determine the name and price of the product of the US country. Select the correct option.
Which of the following SQL query is the example of equi join?
Consider the following table:
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Determine the name and total price of product, produced for the specific state. Select the correct option.
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Which of the following is/are the correct statement is database programming?
Which of the following object privileges is used for stored procedure in a database programming?
Student Table:
|Student_ID|First_Name|Last_Name|Subject| |---|---|---|---| |101|Ajit|Sharma|Physics| |102|Ranjit|Singh|Maths| |103|Virat|Kohli|Sport| |104|Suresh|Saxena|Art| |105|Gagan|Chandra|Chemistry|Consider the following two tables:
Student:
|Student_ID|Name| |---|---| |101|Ajit| |102|Ranjit| |103|Virat| |104|Suresh| |105|Gagan|Mark:
|Student_ID|Total_marks| |---|---| |101|95| |102|91| |103|80| |104|74| |105|69|Display the students which have marks more than 80.
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Student Table:
|Student_ID|First_Name|Last_Name|Subject| |---|---|---|---| |101|Ajit|Sharma|Physics| |102|Ranjit|Singh|Maths| |103|Virat|Kohli|Sport| |104|Suresh|Saxena|Art| |105|Gagan|Chandra|Chemistry|Student Table:
|Student_ID|First_Name|Last_Name|Subject| |---|---|---|---| |101|Ajit|Sharma|Physics| |102|Ranjit|Singh|Maths| |103|Virat|Kohli|Sport| |104|Suresh|Saxena|Art| |105|Gagan|Chandra|Chemistry|Consider the following table:
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Write the SQL query to delete those products, which have price equal to 2000 Rs.
Consider the following table:
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|Find the details of products which have prices within a range of 1500 and 2500 Rs.
Student Table:
|Student_ID|First_Name|Last_Name|Subject| |---|---|---|---| |101|Ajit|Sharma|Physics| |102|Ranjit|Singh|Maths| |103|Virat|Kohli|Sport| |104|Suresh|Saxena|Art| |105|Gagan|Chandra|Chemistry|Consider the following table:
Product Table:
|Category|Product_Name|Product_Price|State|Country| |---|---|---|---|---| |Furniture|Chair|700 Rs|Colordo|US| |Furniture|Bed|2000 Rs|Colordo|US| |Electronics|TV|1200 Rs|Capetown|Africa| |Electronics|Radio|700 Rs|Delhi|India| |Leather|Bag|800 Rs|Mumbai|India| |Garments|Jacket|2300 Rs|Nairobi|Kenya|WAQ to find the details of products whose price is not equal to 2000.