Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
178 views
14 pages
7 - SQL Based Question in RDBMS
Uploaded by
Sunil Singh
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save 7_SQL BASED QUESTION IN RDBMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
178 views
14 pages
7 - SQL Based Question in RDBMS
Uploaded by
Sunil Singh
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save 7_SQL BASED QUESTION IN RDBMS For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 14
Search
Fullscreen
Unit 3 : Database Management System Previous Year Questions Based on SQL Commands ) . ®Write the query to create a table with following structure. Table Product Field Datatype PID Char(4) Pname Varchar(20) Description Varchar(40) Price Decimal Create table Product ( PID Char(4), Pname Varchar(20), Description Varchar(40), Price Decimal yConsider the following table employee: Employee ce EmpNo EmpName Designation 1 Sahil A 2 Amp OB ® 3 Mansi 4 Pooja 1.Which of the following field can be selected as Primary Key? 2. EmpName field also has unique values for all the records. Can it be made primary key? Give answer with reason. w|>|o(i) | Which of the following field can be selected as Primary Key? Ans. EmpNo can be selected as a primary key. (ii) EmpName field also has unique values for all the records. Can it be made primary key? Give answer with reason. Ans. EmpName is having unique values, but there is no guarantee that if more employees are included then there would not be multiple people with similar names. So, in future its values may be duplicate. Thus, it cannot be made as a primary key.,, Categorize the following commands as Boor and DML: SELECT, ALTER, INSERT, DROPeZ DDL — ALTER , DROP DML - SELECT , INSERT(Ora | | Create the following table items. Column name Data type Size Constraint Itemno Integer Primary key Iname Varchar 15 Price Numeric 10, 2 Quantity Integer 3a Create table items ( Itemno integer Primary key, Iname varchar(15), Price numeric(10,2), Quantity integer(3) )Consider the following table Item and write the queries from (i) to (iii) © Table: Item | Itemno Iname | Price Quantity im Soap 40 80 [22 Powder 80 30 [33 Facecream | 250 [25 [44 Shampoo | 120 100 [5s Soapbox 20 50 i. Write a command to insert a new record with the following values : (66, ‘Gel’, 150, 70). ii. Write a query to display all the record of table Item whose price is in the range of 100 and 300. iii. Write a query to display all the records of a table in descending order of quantity.(i) -~ Write a command to insert a new record with the following values : (66, “Gel’, 150, 70). Ans. Insert into item values(66, ‘Gel’, 150, 70); (ii) Write a query to display all the record of table Item whose price is in the range of 100 and 300. Ans. Select * from item where price between 100 and 300; OR Select *from item where price >=100 and price <=300; (iii) Write a query to display all the records of a table in descending order of quantity. Ans. Select * from item order by quantity desc;Consider the following Vendor table and write the queries. Table Vendor VendorlD | VName DateofRegistration | Location 001 Mother Dairy | 20-01-2009 | Dethi v002 Havmor 01-04-2015 | Gujrat vo03 Amul 12-05-2012 | Kolkata 004 Kwality Walls | 15-10-2013 Mumbai 1.Write a query to display all records. 2.Write a query to add new row with the following details. (“V005”, “Vadilal”, “2010-03-20”, “Pune“) 3.Write a query to modify the location of V003 from Kolkata to Gujrat.Ans. (ii) Ans. (iii) Ans. Write a query to display all records. Select * from Vendor; Write a query to add new row with the following details. (“V005”, “Vadilal”, “2010-03-20”, “Pune") Insert into Vendor values (“V005”, “Vadilal”, “2010-03-20”, “Pune”); Write a query to modify the location of V003 from Kolkata to Gujrat. Update Vendor Set location= “Gujrat” Where Vendorld="V003';Write the SQL commands to answer the queries based on Fabric table. FabricID | Frame Type Disc FOO! | Shirt Woollen | 10 F002 Suit | Cotton 20 F003 | Tunic | Cotton [10 F 8 F004 Jeans Denim [5 F006 Shorts Cotton 7 1. To insert the following record (“F005”, “Kurta”, “Woollen”,5). 2. To display only those fabric whose disc is more than 10. 3. To display those record whose type is ‘Woollen’. 4. To modify the fabric shirt by increasing discount by 10. 5. To delete the record of fabric F003 from table.a. To insert the following record (“F005”, “Kurta”, “Woollen”,5) Ans : insert into Fabric values (‘FO05’, ‘Kurta’, ‘Woollen’,5); b. To display only those fabric whose disc is more than 10. Ans : select * from Fabric where Disc>10; c. To display those record whose type is ‘Woollen’ Ans : select * from Fabric where type = ‘Woollen’; d. To modify the fabric shirt by increasing discount by 10 Ans : update fabric set Disc =Disc + 10 where Fname = ‘Shirt’; e. To delete the record of fabric F003 from table Ans : delete from Fabric where FabriclD ="F003";
You might also like
Learning Django
PDF
100% (1)
Learning Django
228 pages
Ques Bank - Database and SQL (Sec-14 Indira Nagar)
PDF
No ratings yet
Ques Bank - Database and SQL (Sec-14 Indira Nagar)
7 pages
SQL Problems (1) 1
PDF
No ratings yet
SQL Problems (1) 1
23 pages
Q-1. Write SQL Commands To Perform Following Tasks: A) Create A Database Hospital'. Output
PDF
No ratings yet
Q-1. Write SQL Commands To Perform Following Tasks: A) Create A Database Hospital'. Output
17 pages
Queries Practice
PDF
No ratings yet
Queries Practice
4 pages
Phpmyadmin: Mysql
PDF
No ratings yet
Phpmyadmin: Mysql
26 pages
SQL Table
PDF
No ratings yet
SQL Table
10 pages
Importantcspt 2
PDF
No ratings yet
Importantcspt 2
25 pages
XII CS - Term2 - Practicals (2021-22) - Sol
PDF
No ratings yet
XII CS - Term2 - Practicals (2021-22) - Sol
13 pages
SQL Commands
PDF
No ratings yet
SQL Commands
7 pages
DBMS Practice Table
PDF
No ratings yet
DBMS Practice Table
8 pages
DBMS Lab SCMS
PDF
No ratings yet
DBMS Lab SCMS
78 pages
SQL Queries
PDF
No ratings yet
SQL Queries
6 pages
Mysql Full Notes
PDF
No ratings yet
Mysql Full Notes
41 pages
12 Ip Cs Mysql Tables Revisions 23 24 QP
PDF
No ratings yet
12 Ip Cs Mysql Tables Revisions 23 24 QP
6 pages
PRACTICAL CS XII MySQL 2022-23
PDF
No ratings yet
PRACTICAL CS XII MySQL 2022-23
18 pages
SQL 1
PDF
No ratings yet
SQL 1
5 pages
CSK W Mysql - Assignments
PDF
No ratings yet
CSK W Mysql - Assignments
5 pages
Practical List of DBMS: and Indices
PDF
No ratings yet
Practical List of DBMS: and Indices
27 pages
Practical List of DBMS: and Indices
PDF
No ratings yet
Practical List of DBMS: and Indices
27 pages
SEIT DBMS PR Question Bank
PDF
No ratings yet
SEIT DBMS PR Question Bank
11 pages
SEM-III Database Design
PDF
No ratings yet
SEM-III Database Design
5 pages
Data Handling: Practical Implementation-1 Input
PDF
No ratings yet
Data Handling: Practical Implementation-1 Input
31 pages
DBMSSQL Commands
PDF
No ratings yet
DBMSSQL Commands
5 pages
SQL PGM 2024
PDF
No ratings yet
SQL PGM 2024
5 pages
Class - Revision - SQL - II
PDF
No ratings yet
Class - Revision - SQL - II
4 pages
Grade 12 - Practical Program (Term2 - (16-25) )
PDF
No ratings yet
Grade 12 - Practical Program (Term2 - (16-25) )
20 pages
It Practical Papper
PDF
No ratings yet
It Practical Papper
13 pages
SQL Questions For Practice
PDF
No ratings yet
SQL Questions For Practice
6 pages
Vidyasthali Public School
PDF
No ratings yet
Vidyasthali Public School
3 pages
SQL Queries
PDF
No ratings yet
SQL Queries
6 pages
1436612-XII CS Worksheet7 MYSQL
PDF
No ratings yet
1436612-XII CS Worksheet7 MYSQL
4 pages
ADBMS Lab Manuals
PDF
No ratings yet
ADBMS Lab Manuals
14 pages
Gordon College: College of Computer Studies
PDF
No ratings yet
Gordon College: College of Computer Studies
4 pages
Worksheets MYSQL 4,5,6
PDF
No ratings yet
Worksheets MYSQL 4,5,6
13 pages
SQL Practicals Class 12
PDF
No ratings yet
SQL Practicals Class 12
6 pages
DBMS Lab1
PDF
No ratings yet
DBMS Lab1
72 pages
Create Drop
PDF
No ratings yet
Create Drop
15 pages
SQL Prac - File Quess
PDF
No ratings yet
SQL Prac - File Quess
1 page
Database Labreport
PDF
No ratings yet
Database Labreport
22 pages
DBMS Query
PDF
No ratings yet
DBMS Query
33 pages
Mysql Questions
PDF
No ratings yet
Mysql Questions
13 pages
DBMS
PDF
No ratings yet
DBMS
8 pages
RDBMS Record Work
PDF
No ratings yet
RDBMS Record Work
25 pages
DBMS Lab1
PDF
No ratings yet
DBMS Lab1
72 pages
SQL Commands
PDF
No ratings yet
SQL Commands
15 pages
Wa0002.
PDF
No ratings yet
Wa0002.
5 pages
Higher Secondary Computer Application - MySQL Practical
PDF
No ratings yet
Higher Secondary Computer Application - MySQL Practical
2 pages
Grade 12 - Practical Program (Term2 - (11-18) )
PDF
No ratings yet
Grade 12 - Practical Program (Term2 - (11-18) )
17 pages
Practical Cs Xii Mysql 2022-23 Final
PDF
No ratings yet
Practical Cs Xii Mysql 2022-23 Final
9 pages
Chapter 7 - Structured Query Language
PDF
No ratings yet
Chapter 7 - Structured Query Language
55 pages
05 - Ritesh Dbms Assignment 1
PDF
No ratings yet
05 - Ritesh Dbms Assignment 1
23 pages
Sample Paper For Preparation
PDF
No ratings yet
Sample Paper For Preparation
11 pages
SQL Commands
PDF
No ratings yet
SQL Commands
13 pages
Adobe Scan 26-Dec-2023
PDF
No ratings yet
Adobe Scan 26-Dec-2023
4 pages
Relational Database and SQL
PDF
No ratings yet
Relational Database and SQL
4 pages
DBMS Recap
PDF
No ratings yet
DBMS Recap
10 pages
Sample Paper Ip pt2 Answer
PDF
No ratings yet
Sample Paper Ip pt2 Answer
6 pages
Commands
PDF
No ratings yet
Commands
2 pages
Commands
PDF
No ratings yet
Commands
2 pages
XI Science Worksheet 1 - Number System
PDF
No ratings yet
XI Science Worksheet 1 - Number System
4 pages
Class X Summer Holiday Homework
PDF
No ratings yet
Class X Summer Holiday Homework
9 pages
7 Series Slicing
PDF
No ratings yet
7 Series Slicing
29 pages
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
PDF
86% (14)
Important DBMS Questions and Answers IT 402 Class 10 RDBMS
8 pages
Tula'S International School, Dehradun Study From Home: Subject: Information Technology
PDF
No ratings yet
Tula'S International School, Dehradun Study From Home: Subject: Information Technology
3 pages
6 - Head and Tail
PDF
No ratings yet
6 - Head and Tail
13 pages
Keyboarding Skills: 16 D D E O - C IX
PDF
50% (2)
Keyboarding Skills: 16 D D E O - C IX
3 pages
Cbse - Department of Skill Education Curriculum For Session 2020-2021
PDF
No ratings yet
Cbse - Department of Skill Education Curriculum For Session 2020-2021
15 pages
Cbse - Department of Skill Education Curriculum For Session 2020-2021
PDF
No ratings yet
Cbse - Department of Skill Education Curriculum For Session 2020-2021
15 pages
IT Applications: IT in Home Computing
PDF
No ratings yet
IT Applications: IT in Home Computing
6 pages
Pointing Devices
PDF
No ratings yet
Pointing Devices
5 pages
Unit 4: Spreadsheet (Intermediate)
PDF
No ratings yet
Unit 4: Spreadsheet (Intermediate)
8 pages
Entrepreneurial Skills X PDF
PDF
No ratings yet
Entrepreneurial Skills X PDF
17 pages
Class 10 - IT - WS3 - INTRODUCTION TO INSTANT MESSAGING
PDF
No ratings yet
Class 10 - IT - WS3 - INTRODUCTION TO INSTANT MESSAGING
3 pages
Skill Management
PDF
No ratings yet
Skill Management
1 page
0884 Learning PHP PDF
PDF
100% (2)
0884 Learning PHP PDF
603 pages
1533099777ctet 2018 PDF
PDF
No ratings yet
1533099777ctet 2018 PDF
1 page
Class 10 - IT - WS2 - INTERNET ACCESS & CONNECTIVITY
PDF
No ratings yet
Class 10 - IT - WS2 - INTERNET ACCESS & CONNECTIVITY
3 pages
Worksheet No. 5 (Online Transactions) 4. Explain Different Kinds of Online Threats. Ans. The Top 10 Most Common Online Threats
PDF
No ratings yet
Worksheet No. 5 (Online Transactions) 4. Explain Different Kinds of Online Threats. Ans. The Top 10 Most Common Online Threats
2 pages
Oracle Database PDF
PDF
No ratings yet
Oracle Database PDF
104 pages
New Doc 2019-11-26 19.20.33
PDF
No ratings yet
New Doc 2019-11-26 19.20.33
1 page
Oracle Database PDF
PDF
No ratings yet
Oracle Database PDF
104 pages
Chapter 69 PDF
PDF
No ratings yet
Chapter 69 PDF
5 pages