Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the astra domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/sqrtyhjzaqx471/public_html/wp-includes/functions.php on line 6121
Create new column with Existing value on other column in MySQL

Home Forums MYSQL Create new column with Existing value on other column in MySQL

Viewing 0 reply threads
  • Author
    Posts
    • #113
      avneesh
      Participant

      Step 1: Add new Column
      ALTER TABLE long_holiday ADD (duplicate_date DATE);
      Step 2: Update new Column with existing value
      UPDATE long_holiday SET duplicate_date = STR_TO_DATE(start_date , '%d-%m-%Y');

Viewing 0 reply threads
  • You must be logged in to reply to this topic.
Scroll to Top