469,133 Members | 1,127 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,133 developers. It's quick & easy.

Why do I have to manually make sequences and triggers for primary keys?

Hi All,

I'm an experienced MS SQL guy and I'm learning Oracle for my new job.
I've been asking around and apparently no-one has ever used a tool that would automatically create sequences for a primary key and the trigger that would go along with it to automatically populate the primary key field. You know something that is done in MS SQLServer with the click of a single button. ;-)

Along with that I would like a tool that would generate audit tables and the associated triggers for me based on a given table as well as the ability to reorder columns.

Does a freeware application like this exist?
If not I guess I'll take an afternoon and hack it out. :(

Mar 10 '09 #1
5 2392
8,127 Expert 4TB
In oracle you need to define your own objects as desired.
Mar 11 '09 #2
2,367 Expert 2GB
You can use a TOAD,SQL Developers etc to create these objects. In TOAD you can create a SEQUENCE,DB LINK etc without writing much code. But NO it is not possible to associate SEQUENCE and TRIGGER by single click. You need to:

1. Create a SEQUENCE
2. Use that SEQUENCE in a TRIGGER to populate a Primary Key value
Mar 11 '09 #3
Yeah I understand that is how you do it. My point is that we shouldn't have to write that out every time we make a new table. It should be done for us! I'm lazy and I want to create applications fast. Any extra steps beyond defining a schema should be automatic!
Some bright boy out there must have made something to do this for us....
Mar 11 '09 #4
8,127 Expert 4TB
come out of your laziness and start writing the code.
Mar 12 '09 #5
I don't understand Oracle people, everywhere I've asked I get the same answer. "Just code it"
Why do things the long, hard, boring way?

I prefer the short, easy, exciting way.
It doesn't matter anyhow as I've already written my own app to do this for me.
2 hours of my time is worth it to never have to code a sequence, trigger or audit table again.
Biff - 1 Oracle - 0

Mar 12 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by jason_s_ford | last post: by
10 posts views Thread by Vilson farias | last post: by
4 posts views Thread by MaRcElO PeReIrA | last post: by
3 posts views Thread by Darrel | last post: by
1 post views Thread by D. Dante Lorenso | last post: by
1 post views Thread by D. Dante Lorenso | last post: by
1 post views Thread by James Robinson | last post: by
4 posts views Thread by --CELKO-- | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.