How to update a data for the views in the relational data
base schema
The UPDATE statement allows you to update a single record
or multiple records in a table.
The syntax for the UPDATE statement is:
UPDATE table
SET column = expression
WHERE predicates;
Example #1 - Simple example
Let's take a look at a very simple example.
UPDATE suppliers
SET name = 'HP'
WHERE name = 'IBM';
This statement would update all supplier names in the
suppliers table from IBM to HP.
Example #2 - More complex example
You can also perform more complicated updates.
You may wish to update records in one table based on values
in another table. Since you can't list more than one table
in the UPDATE statement, you can use the EXISTS clause.
For example:
UPDATE suppliers
SET supplier_name = ( SELECT customers.name
FROM customers
WHERE customers.customer_id = suppliers.supplier_id)
WHERE EXISTS
( SELECT customers.name
FROM customers
WHERE customers.customer_id = suppliers.supplier_id);
Whenever a supplier_id matched a customer_id value, the
supplier_name would be overwritten to the customer name
from the customers table.
-pooja papule
| Is This Answer Correct ? | 1 Yes | 0 No |
Binary tree?
What is ur porject Architecture? If anyone ask what i have to specify here..
What is a programming language?
how we can call xml file in java file using Android platform?
Hi guyes, I have cleared 2 technical rounds with cts for liferay and java techonologies, i have client round next week, please tell me how to prepare for this what questions i should be ready to face?
i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......
Write code to read the records from a file and load any array of size 99?make sure that you take care of all the error conditions?
What is dialog programming?
What is the difference between in-proc and out-of-proc?
what is woransient key word? how it is used in java
About CLR, reflection and assemblies?
What are the compilers of JAVA and .NET Programming languages?