CREATE TABLE employees ( employee_number int NOT NULL, last_name char(50) NOT NULL, first_name char(50) NOT NULL, salary int, dept_id int, CONSTRAINT employees_pk PRIMARY KEY (employee_number) ) ;...


CREATE TABLE employees<br>( employee_number int NOT NULL,<br>last_name char(50) NOT NULL,<br>first_name char(50) NOT NULL,<br>salary int,<br>dept_id int,<br>CONSTRAINT employees_pk PRIMARY KEY (employee_number)<br>) ;<br>INSERT INTO employees<br>(employee_number, last_name, first_name, salary, dept_id)<br>VALUES<br>(1001,<br>Smith', 'John', 62000, 500);<br>INSERT INTO employees<br>(employee_number, last_name, first_name, salary, dept_id)<br>VALUES<br>(1002, 'Anderson',<br>'Jack', 57500, 500);<br>INSERT INTO employees<br>(employee_number, last_name, first_name, salary, dept_id)<br>VALUES<br>(1003, 'Everest', 'Brad', 71000, 501);<br>INSERT INTO employees<br>(employee_number, last_name, first_name, salary, dept_id)<br>VALUES<br>(1004,<br>Horvath',<br>'Jack', 42000, 501);<br>PROBLEMS:<br>1. Create a select statement that will show all employees that have more than 50000 as their salary.<br>2. Create a select statement that will show all employees belonging into department 501.<br>3. Create a select statement that has a first name of Jack arranged them alphabetically in ascending order.<br>

Extracted text: CREATE TABLE employees ( employee_number int NOT NULL, last_name char(50) NOT NULL, first_name char(50) NOT NULL, salary int, dept_id int, CONSTRAINT employees_pk PRIMARY KEY (employee_number) ) ; INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1001, Smith', 'John', 62000, 500); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1002, 'Anderson', 'Jack', 57500, 500); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1003, 'Everest', 'Brad', 71000, 501); INSERT INTO employees (employee_number, last_name, first_name, salary, dept_id) VALUES (1004, Horvath', 'Jack', 42000, 501); PROBLEMS: 1. Create a select statement that will show all employees that have more than 50000 as their salary. 2. Create a select statement that will show all employees belonging into department 501. 3. Create a select statement that has a first name of Jack arranged them alphabetically in ascending order.

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here