Sql Query
Essay by people • October 23, 2011 • Study Guide • 538 Words (3 Pages) • 1,389 Views
Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use salary to restrict the data.) (1/2 pt
SELECT column_last name
FROM employee_table and job title_table
WHERE column _salary
BETWEEN '7.00/hr' AND '11.25/hr'
Write a SQL query that joins two tables in the example database and uses BETWEEN to restrict record selection. (Use hire dates to restrict the data.) (1/2 pt)
SELECT column_last name
FROM table_employee and Job title
WHERE column_hire date
BETWEEN 9/1/2000 AND 1/1/2009
Write a SQL query that joins two tables in the example database and uses LIKE to restrict record selection. (Use telephone area codes to restrict data.) (1 pt)
SELECT column_name(s)
FROM table_employee and job title
WHERE column_'phone number' LIKE '555'
Write a SQL query that joins two tables in the example database and uses greater than to restrict record selection. (Use date of birth to restrict data.) (1 pt)
SELECT column_name(s)
FROM table_employee and job title
WHERE Date of birth='9/1/2011' to 9/11/2011
Write a SQL query that joins two tables and restricts the data based on a single job classification. (1 pt
SELECT column_name(s)
FROM table_employee and job title
WHERE column_'cashier'
Write a SQL query that joins two tables and restricts data based on a specific job title and hire_date that is before a specific date. (1 pt)
SELECT column_last name
FROM employee_table and job title_table
WHERE column _hiredate
WHERE column _cashier
WHERE hire Date='9/5/2011'
Write a SQL query that uses UNION of the two tables to return appropriate results. (1 pt)
SELECT column_last name FROM table_employee
UNION ALL
SELECT column_stocker FROM table_job title
Write a SQL query that finds a job title record which has no associated employee. (1 pt)
SELECT column_last name
FROM employee_table and job title_table
WHERE column _hiredate
WHERE column _cashier
WHERE hire Date='9/1/2000'
Write a SQL query that finds all the job classifications(no duplicates). (1 pt)
CREATE UNIQUE INDEX index_job title
ON table_job title (column_ All columns)
Write a SQL query that finds all employees whose last name begins with the letters p through z
(1pt)
SELECT column_last
...
...