user3671271 user3671271 - 1 year ago 69
SQL Question

How can i write update query for check this plan?

i'm new in database and can write very simple query ,i have two table:

table Maintable with this design:

enter image description here

And table karkard with this design:

enter image description here

want to write this update query in sql server:

update table MainTable
set score=score+karkard.karkard

How can i write that query?thanks all

Answer Source

This is a simple UPDATE query unless I'm missing something in your question:

UPDATE MainTable
  SET  score = mt.score + k.karkard
  FROM MainTable mt
    INNER JOIN karkard k ON k.phonenumber =
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download