472,330 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,330 software developers and data experts.

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 2444
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

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

Similar topics

by: jason_s_ford | last post by:
I have several sql server databases that were recently moved to a new server. In the process of migrating the databases, any triggers and...
by: Vilson farias | last post by:
Greetings, I'm getting a big performance problem and I would like to ask you what would be the reason, but first I need to explain how it...
by: MaRcElO PeReIrA | last post by:
Hi guys, I have been using the following table (short, short, short version): CREATE TABLE products ( prod_id SERIAL, description TEXT );
by: Darrel | last post by:
I have a table that stores the content for a web site I'm making. Each one has a unique ID so I can grab it via the querystring. Since it's being...
by: D. Dante Lorenso | last post by:
In a previous thread, it was determined that rather than use a table sequence for my primary key, I might consider using a compound primary key of...
by: D. Dante Lorenso | last post by:
In a previous thread, it was determined that rather than use a table sequence for my primary key, I might consider using a compound primary key of...
by: Michael Fuhr | last post by:
I'd like to propose that certain GRANTs on a table cascade to the table's implicit sequences. In the current implementation (as of 7.4.5 and...
by: James Robinson | last post by:
Just a sanity check -- data fed into pg using the COPY tablename (col1, col2) FROM stdin; ... data \. Does not cause referential triggers to...
by: --CELKO-- | last post by:
I need to convert a bunch of DB2 triggers to Oracle. Is there any kind of tools for this?
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.