| PL/SQL |
Views |
Comments |
Post |
|
|
Code to find out the statement that caused the trigger to fire
|
| The following trigger code works in SQL Sever 2000 (In SQL Server 7.0, you can't create tables inside a trigger. So, you'll have to create a permanent table before hand and use that inside the trigger). This code only displays the SQL statement, login name, user name and current time, but you can alter the code, so that this information gets logged in a table for tracking/auditing purposes. |
|
1 |
0 |
|
|
|
1 |
0 |
|
|
|
1 |
0 |
|
|
|
1 |
0 |
|
|
T-SQL code to find out the nth highest number in a column
|
| To find out the second highest salary from the employees table? Or To find out the third oldest employee in the company? Here is a stored procedure which accepts the table name, column name, and nth number and displays the nth highest number from the given column. |
|
1 |
0 |
|
|
Find a string in Procedures, Triggers, Constraints, Defaults, Functions, and Views
|
| Find a string in Procedures, Triggers, Constraints, Defaults, Functions, and Views |
|
0 |
0 |
|
|
To see the locks in a particular database
|
| Create this procedure in the master database and call it from the required databases. When you want to see the locks in a particular database, make sure, you are executing this procedure from being in that database. |
|
1 |
0 |
|
|
|
0 |
0 |
|