So As per my needs I have to copy the data from table1 to table2 and for that I'm using the INSERT SELECT QUERY. Here it is :
$sql = "INSERT INTO `attribute_details_versions`(`attribute_details_id`,`attribute_name`,`attribute_text`,`attribute_value`,`created_at`,`updated_at`) SELECT `attribute_details_id`,`attribute_name`,`attribute_text`,`attribute_value`,`created_at`,`updated_at`FROM `attribute_details`";
In above query the data from attribute_details
is copying to attribute_details_versions
table and which is working fine.
But There is 1 more column version
in table attribute_details_versions
and i need to submit the custom value like any integer value (1 or 2 or etc.) in this column. this version column is not exist in
attribute_details` table so how can i insert this custom value using SELECT INSERT QUERY ?
Any Help would be appreciated.