Table Department

IdName
1Human Resouce
2Marketing
3Sales

Table Employee

IdFullNameGenderDateOfBirthAddressSalaryDepartmentId
1Ramesh11993/03/15Ahmedabad20001
2Khilan01973/09/30Delhi15001
3kaushik12007/01/09Kota20002
4Chaitali12005/07/08Mumbai65002
5Hardik02007/03/18Bhopal85002
6Komal02002/03/24MP45003
7Muffy12004/12/31Indore100003
CREATE DATABASE hr;
GO
USE hr;
GO
CREATE TABLE Department
(
	DepartmentId INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
	DepartmentName NVARCHAR(128) NOT NULL
)
GO
CREATE TABLE Employee
(
	EmployeeId INT NOT NULL IDENTITY(1, 1) PRIMARY KEY,
	FullName NVARCHAR(128) NOT NULL,
	Gender BIT NOT NULL,
	DateOfBirth DATE NOT NULL,
	Address NVARCHAR(128),
	Salary INT NOT NULL,
	DepartmentId INT NOT NULL REFERENCES Department(DepartmentId),
)
GO
INSERT INTO Department (DepartmentName) VALUES 
	('Human Resouce'), 
	('Marketing'), 
	('Sales');
GO
INSERT INTO Employee (FullName, Gender, DateOfBirth, Address, Salary, DepartmentId) VALUES
	('Ramesh', 1, '1993/3/15', 'Ahmedabad',	2000, 1),
	('Khilan', 0, '1973/9/30', 'Delhi',	1500, 1),
	('kaushik', 1, '2007/1/9', 'Kota', 2000, 2),
	('Chaitali', 1, '2005/7/8', 'Mumbai', 6500, 2),
	('Hardik', 0, '2007/3/18', 'Bhopal', 8500, 2),
	('Komal', 0, '2002/3/24', 'MP',	4500, 3),
	('Muffy', 1, '2004/12/31', 'Indore',	10000, 3);
GO