Home » RDBMS Server » Server Administration » Re: Updating of Records
Re: Updating of Records [message #370208] Mon, 09 November 1998 23:47
Paul Miller
Messages: 5
Registered: November 1998
Junior Member
First - let's call them columns and rows instead of fields and records.

Now, it seems you have optional (nulls allowed) columns in you table definition. If you do not want to allow that, ALTER TABLE MODIFY ( column_name NOT NULL,...).

a) Only one session ('person' for the sake of simplicity) can update any row at any one time. Your question may on the other hand have to do with candidate keys, in which case you should use ALTER TABLE ADD CONSTRAINT constraint_name PRIMARY KEY (column_name,...) to specify the primary key for the table.

b) DEFAULT column values will be inserted only when the *column* is unspecified, not when it is set to NULL, which means that DEFAULT column values only work for inserting new rows, not updating rows.

c) As I said, DEFAULT values are only used for INSERT statements where the column is unspecified so INSERT INTO three_column_table VALUES (1,2,null) will not put a DEFAULT value in the third columns, but INSERT INTO three_column_table (col1, col2) VALUES (1,2) will put the DEFAULT value in column three.

d) Oracle updates just the column or columns specified in the SET clause.
Previous Topic: Re: DBMS_ALERTS
Next Topic: Re: which database am i connected
Goto Forum:

Current Time: Sun Nov 27 19:56:45 CST 2022