Download the file

Transcript
When selecting all columns from a table with many columns it might be necessary to change
Oracle's default buffer size as it might be too small to handle the large number of columns. For
instance, change the arraysize:
set arraysir.e 10
select *from ozehron.u,.pb where origno = 15;
For more help in formatting contact the DBA.
Updating tbe Database
To make changes throughout a table, the SQL update statement is used. For example -
update ngma.rocks
set Uthname = 'metabasalt'
where Uthname ='metabasite':
The % symbol as substitute for any number of characters is very useful when updating
character fields -
update ngma.samples
set stratunit ='Timbuktu Formation'
where stratgroup like 'Timbuktu%'
and stratunit is not null;
This will update "T1Illbuktu Group", "Timbuktu Sandstone", and any other variants that might
exist. Note that the like operator, rather than =, is required whenever the % symbol is used in
this way.
When you are satisfied that the update has occurred according to plan (ie. the message '25000
records updated' does not appear-when you were expecting about 2!), you must commit the
changes by typing
commit:
The reason for this is that anyone else using the table (eg. from a form) will be suspended from
any updates or inserts on the same records until you commit your update (however, other users
can still select the records). Updates and/or deletes from SQL*Plus place an exclusive lock on
rows until a commit is executed, or until you log out of Oracle. You cannot roll back after a
commit.
© Australian Geological Survey Organisation 1993 - AGSO Oracle Users Guide, Nov 93
17