In a SQL JOIN operation, which keyword is used to return all records when there is a match in one of the tables?
- INNER JOIN
- RIGHT JOIN
- LEFT JOIN
- FULL JOIN
In a SQL JOIN operation, the LEFT JOIN keyword is used to return all records from the left (or first) table, and the matched records from the right (or second) table. If there's no match in the right table, NULL values are returned. This is useful when you want to retrieve all records from one table and only matching records from another. It's commonly used to create inclusive result sets.
Loading...
Related Quiz
- You are writing a PHP script and you need to collect data sent in the URL's query string. How would you do this using the $_GET superglobal?
- What are some common practices in PHP cookie handling?
- You need to retrieve the error message after an error occurs during the execution of a network function in your PHP script. How would you do this?
- You are tasked with creating a report that combines data from a "sales" table and a "products" table. The requirement is to list all products, even those that haven't made a sale. Which JOIN operation would you choose?
- You need to access server-specific information in your PHP script. How would you do this using the $_SERVER superglobal?