Technology Programming

MySQL Joins Update Query Tutorial

    • 1). Open MySQL, connect to the database and open the command line interface.

    • 2). Type "UPDATE plane JOIN passengers ON plane.seat = passengers.seat SET plane.occupied = 'Yes' WHERE passengers.name = 'Jim';" into the command line.

    • 3). Press the "Enter" key to execute the query. MySQL will find all records in the passengers table that match "Jim" in the name column. It then locates all records in the plane table that have matching data in both tables' "seat" fields. MySQL then updates the records in the plane table to show that the seats Jim owns are now occupied. For example, if Jim buys seats 10 and 11 in the passengers table, this query will change the records for seats 10 and 11 in the plane table to reflect that those two sears are now occupied.

    • 4). Type "SELECT * FROM table1" and press "Enter" to execute the query. Examine the results.

Related posts "Technology : Programming"

How LiteData Creates Better Sites For Their Clients

Programming

Contrastive analysis of methodologies of test design for functional testing

Programming

A Proper Diet That Is Filled With Healthy Fats Can Help You Lose Weight

Programming

How to Create an Array of Objects in PHP

Programming

How to read character information from the World of Warcraft servers.

Programming

7 Ways To Master Ayurvedic Medicine For Constipation Without Breaking A Sweat

Programming

Web Design Company Kolkata for Seamless Ecommerce Site

Programming

What Happened to "Borland Delphi"? What is CodeGear? What is Embarcadero?

Programming

How to Send Pages to iFrame

Programming

Leave a Comment