Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
01-21-2012, 03:37 AM #1
- Join Date
- Jul 2011
- Thanked 0 Times in 0 Posts
Help with Oracle SQL*Plus Query assignment
I'm currently working on a lab assignment for class.
Assignment is located here:
The assignment states to write 3 queries in both the SQL:1999 version and the SQL Traditional (older version)
I didn't read that part, and so I created 3 queries and I don't know which ones are 1999 and which ones are traditional.
I would really appreciate it if someone helps me sort this problem out
So overall I need to have 6 queries in total. 3 for the SQL 1999 version and 3 for the SQL traditional (older) version
SELECT e.last_name, e.job_id, e.department_id, d.department_name
FROM employees e JOIN departments d
ON (e.department_id = d.department_id)
JOIN locations l
ON (d.location_id = l.location_id)
WHERE LOWER(l.city) = 'toronto';
SELECT e.last_name, d.department_name
FROM employees e, departments d
WHERE e.department_id = d.department_id AND last_name LIKE 'G%';
SELECT e.last_name "Employee", e.employee_id "Emp#", m.last_name "Manager", m.employee_id "Mgr#"
FROM employees e INNER JOIN employees m
ON e.manager_id = m.employee_id
AND UPPER(e.last_name) LIKE 'G%';
Last edited by tridentspk; 01-21-2012 at 03:57 AM.
01-21-2012, 05:06 AM #2
You posted in the MySQL forum, so expect your post to be moved to the "other databases" forum soon.
But in any case, there aren't many Oracle people who hang out around here.
SQL 1999 seems ancient, to me. I would think the *IT* would be the "traditional" SQL. Sounds like Oracle is still a bit out of date compared to most products,
*IF* I were guessing, I'd say that the use of the keyword JOIN means the newer version and the older version is just done using WHERE clauses.
I know that many many many years ago we used to use *= for a LEFT JOIN.
was really old notation forCode:SELECT ... FROM a *= b WHERE a.x = b.x
But that's more like 1985 to 1990 or so, in the SQL Server world. Much older than SQL 1999.Code:SELECT ... FROM a LEFT JOIN b ON a.x = b.x
You will pardon me, I hope, for saying this seems like a useless exercise. Nobody in their right mind would use a SQL dialect older than 1999 for any real world work today.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.