Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. SQL Server
  3. Question
SQL Server

How can I write an SQL query for updating a particular field?

Asked by Deepa Bhawana Jun 4, 2024 897 views 1 answer
Share

About this question

 I am a database administrator for a particular retail company that can help in maintaining a SQL server database. The database contains two tables – “Orders” and “Customers”. The order table has columns such as order ID, customer ID, order Date, and Status. The customer table has columns such as Customer ID, Customer Name, And Membership Level.

The company has decided to give all customers with a gold membership level a specific “preferred” status for their orders. How can I write an SQL query to update the status fields in the order table for the “preferred” for all the orders where the corresponding customer in the “customers” table has a membership level of “gold”? 

Your answer

1 Answer

More SQL Server discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest SQL Server Blogs

Guides, tips and career advice on SQL Server from JanBask experts.