Untitled UI logotext
Solutions
WebsitesEcommerceMobile AppsWeb AppsProduction Support & Maintenance
Our work
Company
About usBlogPodcastContact us
Book a free consultation

How do I do a JOIN in an UPDATE with SQL Server

Olivia Rhye

I'm working on some client work on Classic ASP and SQL Server. I needed to do an UPDATE with a JOIN and ran across an issue. As with most things T-SQL, the syntax differs from the ANSI standard. Here's how to do it:

UPDATE p
SET p.[Paid] = '0'
FROM [profiles] p, [registered] r
WHERE p.[ID] = r.[ID] AND r.[subscription_id] = @subscription_id

Ready to start a project?

Book a free consultation
Untitled UI logotext
Our work
About us
Blog
Careers
Submit a ticket
Agency Partnerships
Contact
© 2024 fjorge. All rights reserved.
Privacy