XML Project
XML Project
XML Project
mysql>use 123;
database changed
mysql>create table student
(sId int,
sName varchar(20),
sAddress varchar(20),
sDOB date,
sCity varchar(20));
query ok, 0 rows affected(0.12 sec)
mysql>describe student;
Field Type Nul Ke Defaul Extr
l y t a
sId Int Yes Null
sName Varchar(20 Yes Null
)
sAddres Varchar(20 Yes Null
s )
sDOB Date Yes Null
sCity Varchar(20 Yes Null
)
5 rows in set(0.10 sec)
mysql> insert into student
values(12345,’pranav’,’ram vihar’,’1-
1-2001’,’jodhpur’);
query ok, 1 row affected(0.06 sec)
sName
Pranav
sName
Raman
Count(*)
5
Employee table
mysql>create table employee
(
empName varchar(20),
empAddress varchar(20),
empDesignation varchar(20),
empSalary int);
Query ok, 0 row affected in (0.12 sec)
mysql>describe employee;
Field Type Nul Key Defaul Extr
l t a
empName Varchar(2 Yes Null
0)
empAddress Varchar(2 Yes Null
0)
empDesignati Varchar(2 Yes Null
on 0)
empSalary int Yes Null
empName
Pankaj
Manish
Query 3. Display name of employee whose
salary is maximum
mysql>select empName,max(empSalary)as
‘maximum salary’ from employee
Maximum
salary
Narayan
average
salary
4,750