Total Page Preview:   000000002226

What is SQL update statement in English and Hindi

 

SQL update statement in English

The SQL UPDATE statement is used to modify existing records in a table. It allows you to change the values of one or more columns in one or more rows.

Here is the syntax for the SQL UPDATE statement:
Let's break down each component of the UPDATE statement with an example:
Suppose we have a table named "employees" with the following data:
1-Table Name: employees
This is the name of the table that you want to update.
2-SET Statement: SET salary = 55000
This specifies the new value that you want to update in the table. In this example, we are updating the salary of all employees to $55,000.
3-WHERE Clause: WHERE id = 2
This is an optional condition that you can use to update specific rows that meet certain criteria. In this example, we are updating the salary of the employee with an id of 2.
Putting it all together, the SQL UPDATE statement looks like this:
After executing this statement, the table will look like this:
Note that the salary of the employee with id 2 has been updated to $55,000.
 
 

 

SQL update statement in Hindi

"UPDATE" ek SQL statement hai, jo ek ya multiple records ke data ko modify karne ke liye use kiya jata hai. Ye statement kisi bhi table ke data ko update kar sakta hai, jahan pe user ki permission hai.
 
Iske liye, hum "UPDATE" keyword ka use karte hai, aur uske baad "SET" keyword ka use karte hai, jo ek ya multiple columns ke values ko modify karta hai. Fir "WHERE" clause ka use karte hai, jisme hum specify karte hai ki kaun se records ko update karna hai.
 
Example ke liye, hum "students" table ko consider karte hai, jisme har student ke naam aur umar store hai. Hum is table mei kuch records ko update karna chahte hai, jaise ki kuch students ke naam mei spelling mistakes ho sakti hai.
 
Output:
Is table mei, "Jane Smit" ka naam galat hai, jisme "Smit" ki jagah "Smith" likha hona chahiye. Isko update karne ke liye, hum "UPDATE" statement ka use kar sakte hai:
Is statement se, humne "students" table mei se "Jane Smit" ke naam ko "Jane Smith" se replace kar diya hai, jis record ka "name" column "Jane Smit" tha.
Ab hum "students" table ko select karte hai, jisme hum dekh sakte hai ki "Jane Smit" ke naam ko "Jane Smith" se replace kar diya gaya hai:
Output:
 
 
 
 
 
 
 

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: