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

what is runtime exception and compiletime exception ?

1 Answers   Accenture,


What is meant by STACK?

5 Answers   Mascot,


qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again

0 Answers  


how many keywords are present in "c"?

18 Answers   Assurgent, Cynosure Software, IBM,


How to change the color of a cell or a row in a datagrid on mouse hover using javascript/.net

0 Answers   Tesco, Wipro,


converting 41.685 to binary

1 Answers   Hughes,


how many types of operating system are avaliable?

0 Answers   IBM,


There are 3 jars containing two types of round marbles. One jar contains only red marbles, one jar contains only blue marbles and the third jar contains a mix of both red and blue marbles. Although the jars are labeled “red”, “blue” and “mixed” – all the jars are mislabeled. How many marbles would you have to pull out, and out of which jars, to find out how to fix the labels correctly?

1 Answers   Syntel,


How same session variable can be used in both Asp and Asp.net?

1 Answers   Wipro,


how many languages .net is supporting now?

2 Answers  


how to convert hashmap to arraylist with iteration

0 Answers   DFD,


how to get second highest salary from a employee table and how get a 5th highest salary from a employee table by using proc sql?

0 Answers   ABC,


Categories