CREATE table employees(
emp_id INT PRIMARY KEY AUTO_INCREMENT,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
desig VARCHAR(50) NOT NULL DEFAULT 'Probation',
dept VARCHAR(50) NOT NULL
);
INSERT into employees (emp_id,fname,lname,desig,dept) VALUES (101,'Raju','DWIVEDI','Manager','Loan');
INSERT into employees (fname,lname,desig,dept) VALUES ('Sham','SUNDAR','Cashier','Cash');
INSERT into employees (fname,lname,desig,dept) VALUES ('Paul','TIWARI','Asscociate','Loan');
INSERT into employees (fname,lname,desig,dept) VALUES ('Paul','MISHRA','Accountant','Loan'); # not print two paul are there
INSERT into employees (fname,lname,desig,dept) VALUES ('Victor','TRIPATHI','Asscociate','Deposit');
#n SQL, DISTINCT is used to return unique values by removing duplicates from the result set of a query.
#SELECT * FROm employees;
SELECT DISTINCT dept from employees;
To embed this project on your website, copy the following code and paste it into your website's HTML: