Computer Science, asked by divya8182, 1 year ago

create a table employee with 4 attributes (ID,name,department,salary)and apply primary key on ID column and insert minimum 3 tuples in this table?

Answers

Answered by shoaibahmad131
15

Create table employee

(

ID int,

Name varchar(10),

Department varchar(10),

Salary int,

Primary Key (ID)

);

Insert into employee (ID, Name, Department, Salary) values(‘1’, ‘abc’, ‘computer’, ‘20000’);

Insert into employee (ID, Name, Department, Salary) values(‘2’, ‘def’, ‘english’, ‘20000’);

Insert into employee (ID, Name, Department, Salary) values(‘3’, ‘ghi’, ‘math’, ‘20000’);

Insert into employee (ID, Name, Department, Salary) values(‘4’, ‘jkl’, ‘chemistry’, ‘20000’);



bhabenchoudhury1965: Majaaaa
bhabenchoudhury1965: Parisa
bhabenchoudhury1965: How to calculate the varchar brother..........
Answered by Sidyandex
0

ID Name Department Salary

Ert345 Salman Sales department 20000

Rty567 John Support department 30000

Muy533 Ronny HR department 40000


Here I have added the primary key on the ID column for each employee and created their records.

Four attributes are ID, Name, Salary and the Department.

First I have added the attributes and listed the employee name based on the amount of salary they get in the ascending order.

Similar questions