Collections:
Inner Join with the WHERE Clause in MySQL
How To Write an Inner Join with the WHERE Clause in MySQL?
✍: FYIcenter.com
If you don't want to use the INNER JOIN ... ON clause to write an inner join, you can put the join condition in the WHERE clause as shown in the following query example:
mysql> SELECT l.id, l.url, r.comment FROM fyi_links l, fyi_rates r WHERE l.id = r.id; +-----+-------------------+-----------+ | id | url | comment | +-----+-------------------+-----------+ | 101 | dev.fyicenter.com | The best | | 102 | dba.fyicenter.com | Well done | | 103 | sqa.fyicenter.com | Thumbs up | +-----+-------------------+-----------+ 3 rows in set (0.00 sec)
⇒ Assign Names to Query Output Columns in MySQL
⇐ Query with a Full Outer Join in MySQL
2017-09-28, 2202🔥, 0💬
Popular Posts:
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
How To Generate CREATE VIEW Script on an Existing View in SQL Server? If you want to know how an exi...
How To Get the Definition of a Stored Procedure Back in SQL Server Transact-SQL? If you want get the...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
How To Drop an Index in Oracle? If you don't need an existing index any more, you should delete it w...