Plan for failures, hope for success!
Update SQL Table from the Values on Another Table
This is one of those…”So I can remember in the future” Posts
1 2 |
UPDATE mydb a INNER JOIN users b ON a.user_name = b.user_name SET a.create_tmstmp = b.create_tmstmp |
Two Tables
1) mydb with fields user_name, group_id, create_tmstmp, edit_tmstmp
2) users with fiels user_name, user_id, extension, manager, create_tmstmp, edit_tmstmp
Since the mydb table contains group information, and the users table contains user information, a group which is created for a single user gets updated with the same create timestamp as the user
Comments are closed.