Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Procedure syntax Where Can I find many examples

Status
Not open for further replies.

cyberbiker

Programmer
Mar 16, 2001
431
US
I am struggling with the syntax for stored procedures and triggers.
Most of the books I have are pretty simplistic and I am wondering if anybody knows a good place for me to find sample code to study?

One that I am trying to write at this time would be something like:

CREATE TRIGGER [UpdateTable2] ON [Table1]
FOR Update
AS

at this point I want to do something like

update table2 set table2.assigned = 0 where table2.number = table1.number (before table1 update)

update table2 set table2.assigned = 1 where table2.number = table1.number (after table1 update).

What I really need is someplace to find some detailed information on the t-sql language.

Thanks

Terry (cyberbiker)
 
YOu can look at Books Online that comes with Sql Server.

Also google and internet in general.
 
I may not have been real clear.

I keep searching and find quite a few references.
But almost all seem to be basically similar.

Perhaps what I really should have asked for is something like a "language reference" as I once found for Visual Basic when I started programming.

I have not yet found anything like that for t-sql



Terry (cyberbiker)
 
Code Centric: T-SQL Programming with Stored Procedures and Triggers
by Garth Wells



SQL Server 2000 Design & T-SQL Programming
by Michael Reilly

Sams Teach Yourself SQL in 10 Minutes (2nd Edition)
by Ben Forta

The Guru's Guide to Transact-SQL
by Ken Henderson
 
Thank you very much.

I will look for those at the book store Monday when they open.

I have used the Sams book to learn basic SQL language and keep it beside me for quick look ups.

I would guess that the Sam's book has provided me with 90% or more of what I have needed in the past.


Terry (cyberbiker)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top