In: Computer Science
do the following SQL programming tasks:
#Use the CREATE TABLE statement to build the sample table
CREATE TABLE EMPLOYEE__(
emp_id INT PRIMARY KEY NOT NULL,
emp_firstName VARCHAR(255) NOT NULL,
emp_lastName VARCHAR(255) NOT NULL,
emp_deptName VARCHAR(255) NOT NULL
);
#Use the INSERT INTO statement to populate it - use either the
data in the image or your own
INSERT INTO EMPLOYEE__ VALUES (100, 'John', 'Deo',
'Engineering');
INSERT INTO EMPLOYEE__ VALUES (101, 'Mary', 'Jane', 'HR');
INSERT INTO EMPLOYEE__ VALUES (102, 'James', 'Bind', 'HR');
#Write an SQL query to display the whole populated table
SELECT * FROM EMPLOYEE__;
#Write an SQL query to display certain combinations of columns
(use your imagination)
SELECT emp_id, emp_firstName, emp_lastName FROM EMPLOYEE__ WHERE
emp_id = 101;
#Write an SQL query to extract certain combinations of columns
and rows (imagination again!)
SELECT emp_id, emp_firstName, emp_lastName, emp_deptName FROM
EMPLOYEE__ WHERE emp_deptName = 'HR';
#Please provide your feedback by clicking the feedback button,
so that i can improve my answering skills