+ 1

Update records based on another table value is possible or not?

eg: select id,name,age from students; select id,name,age from school; update students set age = age(school table) where id= id (school table);

22nd Jul 2017, 6:09 AM
Suresh Babu
Suresh Babu - avatar
1 Réponse
0
you can use select in select. update students set age = 28 where id in (select id from schools)
25th Jul 2017, 5:03 AM
Claudiu Stefan Haidu
Claudiu Stefan Haidu - avatar