Issue
I need something like this
INSERT INTO `tb1`(`button`,'name')
SELECT button FROM `tb2` WHERE `ID` = 1, VALUE ('some name')
In button I want to copy button data from tb2, In name I just want to put in a name. I can either copy from another table or enter a VALUE but I cannot do both.
Any suggestions would be appreciated.
Solution
Try this:
INSERT INTO `tb1`(`button`,`name`)
SELECT button, 'Some name' FROM `tb2` WHERE `ID` = 1
Answered By - Gurwinder Singh
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.