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 |
what is delegats ?
what is the pl/sql block size in oracle 10g and 11g?
write a sql qwery which include joining of two tables 4 marks mainframe
in cobol,wat is the difference in using 'set index in occurs clause' ....and 'occurs depending-on clause'
hi viewers, tell me,what is scripting and programming, define and difference...pls
a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov
how to display xisheet in list box in c# .net
Why COBOL/400 is giving 95 session error when opening a file even though the file is having key and the screen or display file is having IND ARA defined?
if try is followed by finally block what happen to exception occured in try block
3 Answers Professional Access,
what are the activities you enjoy most and How do you see these Developing in the Future with Reference to in your work life and in your personal life
I HAVE DONE TESTING TOOLS COURSE,NOW I AM FRESHER,I AM NOT GETTING ANY CALLS,I WANT TO DO THE PROJECT ,WHERE I HAVE TO MEET TO DO THE PROJECT,I AM GOING WITH FAKE EXPERIENCE,SO WHAT I HAVE TO DO.
Please describe an example where you used object orientation in one of your programs.