By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,742 Members | 773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,742 IT Pros & Developers. It's quick & easy.

Re: Oracle Problem 1: Please Help

P: n/a

The table looks like the following:
Code
-------------------

INSTRUCTOR_ID(PK) NUMBER(8,0) NOT NULL
SALUTATION VARCHAR2(5) NULL
FIRST_NAME VARCHAR2(25) NULL
LAST_NAME VARCHAR2(25) NULL
STREET_ADDRESS VARCHAR2(50) NULL
ZIP(FK) VARCHAR2(5) NOT NULL
PHONE VARCHAR2(15)
CREATED_BY VARCHAR(3)
CREATED_DATE DATE NOT NUL
-------------------
I'm not fully capable to write PL/SQL I just started last week howeve
I am a very compitent student. If I need to write a trigger could yo
lead me in the right direction
-
singhji
-----------------------------------------------------------------------
Posted via http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message173341.htm
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
singhjih wrote:
>
The table looks like the following:
Code:
--------------------

INSTRUCTOR_ID(PK) NUMBER(8,0) NOT NULL
SALUTATION VARCHAR2(5) NULL
FIRST_NAME VARCHAR2(25) NULL
LAST_NAME VARCHAR2(25) NULL
STREET_ADDRESS VARCHAR2(50) NULL
ZIP(FK) VARCHAR2(5) NOT NULL
PHONE VARCHAR2(15)
CREATED_BY VARCHAR(3)
CREATED_DATE DATE NOT NULL
--------------------
I'm not fully capable to write PL/SQL I just started last week however
I am a very compitent student. If I need to write a trigger could you
lead me in the right direction.

Oracle has a lot of good documentation on their site at
http://docs.oracle.com. You should get familiar with the one called 'SQL
Reference' for language and syntax, and the one called PLSQL Reference (I
think) for general PLSQL.

CREATE TRIGGER and PLSQL Anonymous block are some keywords.

/Hans
Jun 27 '08 #2

P: n/a
Hans Forbrich <fo******@yahoo.netwrote in message news:<enBcc.7559$Sh4.5308@edtnps84>...
singhjih wrote:

The table looks like the following:
Code:
--------------------

INSTRUCTOR_ID(PK) NUMBER(8,0) NOT NULL
SALUTATION VARCHAR2(5) NULL
FIRST_NAME VARCHAR2(25) NULL
LAST_NAME VARCHAR2(25) NULL
STREET_ADDRESS VARCHAR2(50) NULL
ZIP(FK) VARCHAR2(5) NOT NULL
PHONE VARCHAR2(15)
CREATED_BY VARCHAR(3)
CREATED_DATE DATE NOT NULL
--------------------
I'm not fully capable to write PL/SQL I just started last week however
I am a very compitent student. If I need to write a trigger could you
lead me in the right direction.

Oracle has a lot of good documentation on their site at
http://docs.oracle.com. You should get familiar with the one called 'SQL
Reference' for language and syntax, and the one called PLSQL Reference (I
think) for general PLSQL.

CREATE TRIGGER and PLSQL Anonymous block are some keywords.

/Hans
Hans gives good advice. Check to doc, its quite complete. The key to
the trigger is that you can reference the old and new values with
syntax :new.<col_nameand :old.<col_name. You can write PL/SQL code
in the trigger that references the old and new value and thus create
complex constraints.

Suggestion. Instead of trying to solve your problem straight out. Try
to create a very simple trigger to get familiar with the concept and
to see it work. Then tackle your problem.

Dave
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.