Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

how to create a trigger?

$
0
0
Hello,

I want to create a trigger for the following table :

[img=http://s24.postimg.org/89cniwszl/1234.jpg]

This is my code :

CREATE TABLE INVOICE (
Invoice_id number CONSTRAINT Invoice_id_pk PRIMARY KEY,
Invoice_date datetime NOT NULL DEFAULT CURDATE(),
Invoice_location varchar2(150) NOT NULL,
Invoice_order number CONSTRAINT Invoice_order_fk REFERENCES order_header(Order_id)
);

What would be the syntax for a trigger for the above table?
I would really appreciate any help :)

thnx!

Viewing all articles
Browse latest Browse all 13329