Dbms Program 13 Mdu
Dbms Program 13 Mdu
PROGRAM NO. 13
Objective: - Create table named student that contains following fields: 1. Roll number of integer type 2. Class of character type 3. Fathers name of character type and show the number of students in each class using Group by clause.
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Apr 12 14:51:51 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options SQL> create table student_cse10409 2 ( 3 roll_no number(5), 4 class char(5), 5 father_name char(15) 6 ); SQL> desc student_cse10409 Name Null? Type ----------------------------------------- -------- ---------------------------ROLL_NO NUMBER(5) CLASS CHAR(5) FATHER_NAME CHAR(15) SQL> select * from student_cse10409;
ROLL_NO ---------401 402 403 404 405 CLASS ----cse cse cse it it FATHER_NAME --------------a.k malhotra dinesh ramesh raju kartik
1. Show the number of students in each class using Group by clause. SQL> select count(roll_no), class from student_cse10409 group by class;
COUNT(ROLL_NO) -------------3 2 CLASS ----cse it
SBIT/CSE/IV/DBMS/CSE-212-F
CSE/10/409