Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle-SQL Problem

Oracle-SQL Problem

From: <mansegak_at_my-dejanews.com>
Date: Tue, 08 Sep 1998 06:49:48 GMT
Message-ID: <6t2k2c$cq0$1@nnrp1.dejanews.com>


In Oracle Application,how can I implement this?

1)I created my own table say MYTABLE
2)This table contain few field such as CREATION_DATE,   CREATED_BY,LAST_UPDATED_DATE, LAST_UPDATED_BY   etc...etc....(some other fields that necessary)

My question is, how I want to get the "default value to be insert" into for this 4 special field everytime the user do a DML (Data Manipulation :INSERT/UPDATE) "automatically", ie:

a)CREATION_DATE - Maybe I can default it to SYSDATE (am I correct?) b)But how about the rest (CREATED_BY,LAST_UPDATE_DATE & LAST_UPDATE_BY)

I mean, how the system will know it is an update operation (since, if so I can use SYSDATE as well for LAST_UPDATE_DATE) in SQL.(How can I implement it using SQL statement?)

Can anybody help me on this since I really "blur" on this situation.

Thanks.
Norazman

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Sep 08 1998 - 01:49:48 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US