0% found this document useful (0 votes)
4 views1 page

sql table

The document outlines the creation of two databases: 'employees' and 'students'. It includes the creation of tables 'info' and 'stu' with respective fields, followed by the insertion of sample data for employees and students. The employee data includes details like ID, name, gender, age, department, date of joining, salary, and city, while the student data includes roll number, name, gender, age, department, date of admission, and percentage.

Uploaded by

pastudents023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

sql table

The document outlines the creation of two databases: 'employees' and 'students'. It includes the creation of tables 'info' and 'stu' with respective fields, followed by the insertion of sample data for employees and students. The employee data includes details like ID, name, gender, age, department, date of joining, salary, and city, while the student data includes roll number, name, gender, age, department, date of admission, and percentage.

Uploaded by

pastudents023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

create database employees;

use employees;
create table info (EmpID int(1),Name varchar(20),Gender char(1),Age int(2),Dept
varchar(20),DOJ date,Salary int(10),City varchar(10));
insert into info values(1,'Praveen','M',25,'Sales','1989-06-08',20000,'Chennai'),
(2,'Arun','M',29,'Marketing','1989-09-26',22000,'Chennai'),
(3,'Usha','F',27,'Finance',
'1994-08-09',25000,'Bangalore'),(4,'Bala','M',31,'Sales','1990-03-23',27000,NULL),
(5,'Rani','F',28,'Marketing','1990-04-23',27000,'Mumbai'),(6,'Nisha','F',26,Null,
'1991-02-24',18000,'Bangalore'),(7,'Manoj','M',32,'Finance','1982-05-
06',30000,'Goa');

create database students;


use students;
create table stu (Rollno int(2),Name varchar(20),Gender char(1),Age int(2),Dept
varchar(10),DOA date,Percentage decimal(5,2));
insert into stu values(1,'Arun','M',16,'CS','1997-01-10',97.8),
(2,'Ankit','M',17,'IP','1998-06-24',95.2),(3,'Anu','F',15,'Hindi','1996-07-12',81),
(4,'Bala','F',17,'IP',
'1990-07-01',75.5),(5,'Charan','M',16,'Hindi','1997-06-27',92.13),
(6,'Deepa','F',16,'History','1997-06-27',60.54),(7,'Dinesh','M',15,'CS','1996-08-
25',82);

You might also like