0

`I read some other posts on here but wasnt sure if it completely related to my issue. I need to copy a column called "link" to another column called "weblink" within the same table.

What would the query be for this? I just want to make sure that nothing else will be affected and that only the weblink column updates to match the data in the link column.`

Learner
  • 1
  • 3
  • It' should be pretty straight forward: `UPDATE tablename SET weblink = link` – M. Eriksson Feb 16 '20 at 16:07
  • brother, it works manual all the time but I want it automatically when user submit the data it should make a copy automatically – Learner Feb 16 '20 at 16:15
  • 1
    That's a different question from what you've posted. When asking a question, you need to explain the issue fully. We can't read your mind. But I don't really see the issue here. If you, for some unknown reason, want to have a value duplicated in two different columns, just insert the value on both column in your insert and/or update query. – M. Eriksson Feb 16 '20 at 16:16
  • @Learner please check this post if you want the column calculated based on another column as you posted in comments : https://stackoverflow.com/questions/5222044/column-calculated-from-another-column – Sravanth Pujari Feb 16 '20 at 16:36
  • Does this answer your question? [Column calculated from another column?](https://stackoverflow.com/questions/5222044/column-calculated-from-another-column) – Sravanth Pujari Feb 16 '20 at 16:37

0 Answers0