Created
June 12, 2015 14:40
-
-
Save egulhan/47946a56c5bbf7118043 to your computer and use it in GitHub Desktop.
Example of insert query from select query (including substr function using)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO tbl_media_files_tmf(entity_type_id,entity_id,file_name,media_type,sort_order,status,created_date,update_date) | |
| SELECT CONCAT("37"),entity_id,CONCAT(substring_index(file_name,'.',1),'_mobile.jpg'),media_type,sort_order,status,created_date,update_date FROM tbl_media_files_tmf where entity_type_id=29; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment