SQL Tips & Tricks
You could use following query to find all queries (processes) currently in your server.
Simple tips to fetch tables that have triggers or to fetch all triggers on a table. Example: How to get list of Triggers on Table Example: How to get list of Tables that have triggers
Example: List of tables with triggers Example: List of all triggers on a table
You could create foreign key as part of creating the table itself as shown below: If the table already has been created, you could simply create the foreign key constraint as shown below. In below SQL snippet, you would notice that I am adding the constraint with no check, so as to stop the database […]
An identity column in SQL Server cannot be of varchar datatype. However, we would want to have to have an identity column which is of alphanumeric datatype. We could get around this using computed column. In the following example, I am going to create an identity column, and a computed column which gets its value […]
It is quite simple to calculate running in SQL Server using Sub Query.