Beruflich Dokumente
Kultur Dokumente
Connected to:
SQL> create table stu11(stu_id char(20), name char(8), dob date, sex char(1), class char(2), hcode
Table created.
STU_ID CHAR(20)
NAME CHAR(8)
DOB DATE
SEX CHAR(1)
CLASS CHAR(2)
HCODE CHAR(1)
DCODE CHAR(3)
MTEST NUMBER(2)
1 row created.
1 row created.
1 row created
1 row created.
1 row created.
SQL> select *from stu11;
1 Gyan 15-OCT-86 M 10 R 9 96
2 Vikash 10-JAN-85 M 9 G 8 98
3 Muku 12-DEC-98 M 7 Y 6 87
4 Rose 16-OCT-81 F 5 B 1 90
5 sita 12-DEC-89 F 3 V 1 90
NAME H CL
-------- - --
sita V3
NAME H CL
-------- - --
sita V3
#List name and age of class 9 student.
SQL> select name, round((sysdate-dob)/365) as age from stu11 where class=9 and sex='M';
NAME AGE
-------- ----------
Vikash 26
NAME MTEST
-------- ----------
Gyan 96
Vikash 98
Muku 87
Rose 90
sita 90
NAME CL
-------- --
Gyan 10
-------- -- -
Vikash 9 G
SQL> select name,mtest from stu11 where class=3 and mtest between 70 and 90;
NAME MTEST
-------- ----------
sita 90