![]() |
SQL experts, can you please help.
Ok, so I have primary key thats AUTO_INCREMENT. There's another field file_name that I need to populate with number from primary key plus file extension
So right now its like this and I need to run an update query to populate file_name fields File_Id File_name 1 NULL 2 NULL 3 NULL To be File_Id File_name 1 1.jpg 2 2.jpg 3 3.jpg What's correct structure of update query? Thank you http://i.backpackgnome.com/174092006...0.65184957.gif |
UPDATE table SET File_name = CONCAT( File_id, '.jpg' );
|
Quote:
Thank you very much! |
All times are GMT -7. The time now is 11:35 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123