मराठी

An educational institution is maintaining a database for storing the details of courses being offered. The database includes a table COURSE with the following attributes: C_ID: Stores the unique ID - Informatics Practices

Advertisements
Advertisements

प्रश्न

An educational institution is maintaining a database for storing the details of courses being offered. The database includes a table COURSE with the following attributes:

C_ID: Stores the unique ID for each course.

C_NAME: Stores the course’s name.

INSTRUCTOR: Stores the name of the course instructor.

DURATION: Stores the duration of the course in hours.

Table: COURSE

C_ID C_NAME INSTRUCTION DURATION
C101 Data Structures Dr. Alok 40
C102 Machine Learning Prof. Sunita 60
C103 Web Development Ms. Sakshi 45
C104 Database Management Mr. Suresh 50
C105 Python Programming Dr. Pawan 35

Write SQL queries for the following:

  1. To add a new record with following specifications:
    C_ID  : C106
    C_NAME  : Introduction to AI
    INSTRUCTOR  : Ms. Preeti
    DURATION  : 55
  2. To display the longest duration among all courses.
  3. To count total number of courses run by the institution.
  4. To display the instructors’ name in lower case.
कोड लेखन
Advertisements

उत्तर

  1. INSERT INTO COURSE (C _ ID, C _ NAME, INSTRUCTOR, DURATION) VALUES ('C106',‘INTRODUCTION TO AI’, ‘MS. PREETI’, 55);
  2. SELECT MAX (DURATION) FROM COURSE;
  3. SELECT COUNT (*) FROM COURSE;
  4. SELECT LOWER (INSTRUCTOR) FROM COURSE;
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Set 4

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×