PHP MySql Web Hosting

PHP and MySQL Web Development

,ch03.13605 Page 136 Wednesday, November 29, 2000 4:42

Filed under: SQL in a Nutshell — webmaster @ 4:21 pm

,ch03.13605 Page 136 Wednesday, November 29, 2000 4:42 PM — ANSI style SELECT e.emp_id, e.fname, e.lname, j.job_desc FROM employee e CROSS JOIN jobs j Inner Join Specifies that unmatched rows in either table of the join should be discarded. If no join type is explicitly defined in the ANSI style, then this is the default (currently supported by Microsoft SQL Server, PostgreSQL and MySQL): — theta style SELECT e.emp_id, e.fname, e.lname, j.job_desc FROM employee e, jobs j WHERE e.job_id = j.job_id — ANSI style SELECT e.emp_id, e.fname, e.lname, j.job_desc FROM employee e JOIN jobs j ON e.job_id = j.job_id Left [Outer] Join Specifies that all records be returned from the table on the left side of the join statement. If a record is returned from the left table has no matching record in the table on the right side of the join, it is still returned. Columns from the right table return NULL values. (In this case, all employees are returned whether they have a job description or not.) Many professionals recommend configuring outer joins as left joins wherever possible for consistency (currently supported by Microsoft SQL Server): — Oracle theta style SELECT e.emp_id, e.fname, e.lname, j.job_desc FROM employee e, jobs j WHERE j.job_id (+) = e.job_id — ANSI style SELECT e.emp_id, e.fname, e.lname, j.job_desc FROM employee e LEFT JOIN jobs j ON e.job_id = j.job_id 136 Chapter 3 SQL Statements Command Reference

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by PHP MySQL Web Hosting