Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to update a data for the views in the relational data
base schema



How to update a data for the views in the relational data base schema..

Answer / poopapule

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

Post New Answer

More Programming Languages AllOther Interview Questions

How Many versions are there in crystal reports

2 Answers   Wipro,


in a VB application, where the data will be stored after manipulation? what is the syntax for that?

0 Answers   TCS,


What is meant by SQL,PL/SQL,SQL PLUS? Is there any differnece between them?

2 Answers   HSBC,


what are methods we have in connection pooling

1 Answers   Wipro,


needs examples for black box testing and white box testing

1 Answers   CTS, IBM, Wipro,


what is the difference between java , sap ,.net , orecle apps ?

1 Answers  


the systematic access of small computers in a distributed data processing system is referred as?

0 Answers   Mphasis,


I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution

0 Answers  


Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad

0 Answers  


is try block possible without catch block?

3 Answers  


how we define two jobs have same name??is it exist??

0 Answers   CTS,


How will you prove that java swing is multithreaded?

0 Answers  


Categories