sql >> Database teknologi >  >> RDS >> Mysql

Flere joinforbindelser i MySQL-tabel

Deltag to gange.

SELECT s.name, p1.ProductName AS product_1_name, p1.ProductPrice AS product_1_price, p2.ProductName AS product_2_name, p2.ProductPrice AS product_2_price FROM sponsers AS s JOIN products AS p1 ON s.ProductID1 = p1.ProductID JOIN products AS p2 ON s.ProductID2 = p2.ProductID


  1. Gem accenter i MySQL-databasen

  2. PHP-fejl -> Advarsel:mysqli_stmt::execute():Kunne ikke hente mysqli_stmt | Advarsel:mysqli_stmt::close()

  3. PHP Prepared Statements... Bind variabel som numerisk område i REGEXP?

  4. MySQL-ydelse:MySQL vs. MariaDB