हिंदी

Answer the following questions based on the table Salesman given below: Table: Salesman salesman_id 5001 name Neil Bhatt city Delhi commission 0.15 - Informatics Practices

Advertisements
Advertisements

प्रश्न

Answer the following questions based on the table Salesman given below: 

                             Table: Salesman

salesman_id name city commission
5001 Neil Bhatt Delhi 0.15
5002 Rohan Malik Mumbai 0.13
5005 Ravi Mohan Delhi 0.11
5006 Mehak Rai Delhi 0.14
5007 Pual lal Bangalore 0.13
5003 Raman Sen Kolkata 0.12
  1. How many tuples does the given table have?
  2. Suggest the primary key for the given table.
  3. Write the MySQL query to display all the records in descending order of commission. 
लघु उत्तरीय

उत्तर

  1. Tuple = 6
    Explanation: The term "tuple" describes how many records or rows are in the table.
  2. Primary Key - salesman_id 
    Explanation: The primary key needs to be unique and empty of null values. Unique values exist in the salesman ID column of this table. It has so been chosen as the primary key.
  3. SELECT*FROM Salesman ORDER BY commission DESC; 
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2023-2024 (February) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×