20

I have a table that I just added a column to and now I am trying to find an easy way to update it.

select * from KioskGoals kg inner join [TestDB].dbo.Kiosks k on kg.kioskID = k.Id 

The joined table has the names I need. I want to update KioskGoals table and set the kioskName column = to the name returned from [TestDB].dbo.Kiosks which would be k.name

Is this possible with a single query?

The table that needs to be updated is KioskGoals. The column that needs to be updated is kioskName.

0

1 Answer 1

10
UPDATE kg SET Kg.kioskName = K.name from KioskGoals kg inner join [TestDB].dbo.Kiosks k on kg.kioskID = k.Id 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.