|
|
How to write a trigger for INSERT, UPDATE or DELETE operation ?
|
Total Hit (2339) |
Here is very basic code to write trigger for INSERT, UPDATE or DELETE operation on a table. Internally SQL Server manages two tables (inserted and deleted) to perform trigger operations.
All inserted records can be retrived by quering "inserted" table
«code LangId=6»select * from inserted«/cod
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some useful UDF for SQL Server 2000
|
Total Hit (2931) |
Introduction
UDF examples
Database creation date
Date the object was created
Get date part of datetime value
Get time part of datetime value
Get the number of working days between two dates
«B»Introduction«/B»
SQL Server 2000 supports User-Defined Functions (UDFs) - one or more Tr
....Read More |
Rating
|
|
|
mark the stored procedure to automatic execution
|
Total Hit (2768) |
You can use the sp_procoption system stored procedure to mark the stored procedure to automatic execution when the SQL Server will start.
Note. Only objects in the master database owned by dbo can have the startup setting changed and this option is restricted to objects that have no parameters.
....Read More |
Rating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|