views:

219

answers:

4

I am a student, with decent knowledge of SQL, but have had very little to do with triggers in the past. I've looked at a few sites for guidance, but comprehensive explanation on all commonly used statements seems fairly sparse.

Is there a 'definitive' site for this kind of thing? Perhaps like a w3chools for advanced SQL?

A: 

When I was doing some MySQL development, I looked here for info on triggers.

itsmatt
A: 

Once you know a little SQL, try to check out Joe Celko's books. Advanced SQL Programming has a short section on triggers. Since you're a student, you can probably get a copy at the library. If you think you're going to be doing deeper SQL dev work, you'll be glad to score your own personal copy of the book. You can get the relational DB engine to do a significant amount of work in a small amount of code - thinking that way will make you a much more efficient programmer. Most book stores (my local Borders always has a couple copies) will have a copy on the shelf, so browse before you buy.

Also, check out the online manuals for the database you're using as itsmatt suggests.

Tom
A: 

I've always thought that the SQL Server Books Online (installed with SQL Server) were a good source of info.

Mike K.
A: 

This sounds a bit like an "old shoe or glass bottle" question.

Triggers are one of those things that you should really stay away from unless you really really know what you're doing and have a very good reason for doing what you're doing. So naturally, one of the prerequisites to ever using a trigger is that you should have a thorough understanding of how they work and their implications. Thus, you can see how the idea of an "Intro to Triggers" text may sound like a very dangerous thing to some people.

So my advice, cruel as it may sound, is this: If you're the sort of person who needs an intro text on this particular topic, then you might be better served in the long run by simply avoiding Triggers for the time being.

Jason Kester
Normally I'd agree, but I think the title I used was maybe a bit misleading. I was looking for some kind of comprehensive reference that didn't skim over the nitty gritty on triggers! Plus, being a student, I am very unlikely to break anything important! :)Sage advice though!
crofty