GROUP - B
2. Write SQL commands for (a) to (e) on the basis of FAMILY relation given
below:
1.5=5
निम्न प्रदत्त FAMILY संबंध के आधार पर (a) से (e) तक के लिए SQL कमाण्ड लिखें :
No. Name Female Male Income (Rs.) Occupation
Members Members
1 Mishra
7,000
Service
2 Gupta 4 1 1
50,000
Business
3 Khan I 6 I 3 8 ,000
Mixed
4 Chadda
2 I 2 I 25,000 Business
5 Yadav
20,000
Mixed
6 Joshi
14,000
Service
7 Maurya
1 3 5,000
Farming
8 Rao I 5
10,000
Service
To select all the information of family whose occupation is service.
सर्विस ओक्यूपेशन के सभी लोगों की सभी जानकारी सिलेक्ट करने के लिए।
a)
Answers
Answer:
SELECT * FROM family WHERE Occupation='Service';
SQL Query:
SELECT * FROM FAMILY
WHERE Occupation = 'Service';
Explanation:
The given table is:
TABLE NAME: FAMILY
No Name Income Occupation
1 Mishra 7,000 Service
2 Gupta 50,000 Business
3 Khan 38,000 Mixed
4 Chadda 25,000 Business
5 Yadav 20,000 Mixed
6 Joshi 14,000 Service
7 Maurya 35,000 Farming
8 Service 10,000 Service
We were asked to SELECT all the information of the records/rows of the persons whose occupation falls under the category of 'Service'
Syntax:
SELECT * FROM TABLE_NAME WHERE CONDITION;
SELECT - IS used to select the elements mentioned in the query
* - Represents to select the complete row information
TABLE_NAME - Name of the table. Here it is Family
WHERE - Represents the condition
CONDITION - Based on which we extract the elements from the table. Here, the condition is Occupation='Service'
So, the query will be
SELECT * FROM FAMILY WHERE Occupation = 'Service';
Output:
No Name Income Occupation
1 Mishra 7,000 Service
6 Joshi 14,000 Service
8 Service 10,000 Service
Learn more:
1. What are the maximum and the minimum number of rows returned by the R1 right outer join R2?
https://brainly.in/question/21195376
2. Noisy values are the values that are valid for the dataset but are incorrectly recorded. Is it?
brainly.in/question/6658996