I have two tables. One has "id" and "title". Other has only "id". How can i automatically add the title with same id of first table alongside the id of second table... Here is a small representation. Table 1: ====== Id || Title 1 The Main Heading 2 Side Heading Table 2: ====== Id || Title 1 Empty 2 Empty I want the EMPTY in table 2 to be filled automatically by the title that is having the same id in table 1 Can Anybody help me??
I think it will be something like UPDATE table2 SET Title = ( SELECT table1.Title FROM table1 WHERE table1.id = table2.id ) Code (markup):