Get all user def table info
Get space for all user defined table information like size and row counts.
2013-12-27 (first published: 2007-08-29)
7,660 reads
Get space for all user defined table information like size and row counts.
2013-12-27 (first published: 2007-08-29)
7,660 reads
Recently one of my friend was doing some investigation in a new/unknown database and had really hard time locating the primary key – foreign key relations. Like it’s really tough to locate these relations when not enforced at database level in terms of primary key and foreign key constraints. But generally all database developers keep […]
2011-09-14 (first published: 2007-08-15)
2,741 reads
Three different ways that you can get the count of the rows in a table.
2011-06-16 (first published: 2007-08-16)
6,541 reads
Sometimes we need to generate the data based on a given date, to an end date (data extrapolation).
This is a easy way to do that without any temporary storage.
2008-11-14 (first published: 2008-09-25)
864 reads
We can use this function to combine multiple rows into single one. Generally to create comma separated list for each unique item. So this can create comma separated product list for any given category. The same can be used to make a list of items in a given order.ThanksMohit Nayyarhttp://mohitnayyar.blogspot.com/
2007-09-14
3,772 reads
This query will give you the current job status of all scheduled jobs on sql server. Just by using sysJobs, and sysJobHistory table you will get to know the details about the last status of the scheduled jobs, irrespective of their status like failed, successful, or cancelled.Note: You must have admin right on MSDB database […]
2003-09-04
8,505 reads
This procedure will give you the list of tables in the current database along with total columns in the table, no. of rows and the primary key(s) defined for the table.Mohit NayyarMCP, MCAD (.Net), MCSD, MCDBA
2003-04-30
755 reads
Using this technique you can do error handling in SQL Server using the same way you do in Visual Basic (most of it). Just put your SQL Statement in exec('SQL Command') and make use of @@Error to get error information and put your error handling code in If block.Mohit NayyarMCP (.Net), MCSD, MCDBA
2003-04-17
946 reads
This query will give you the table name and column name on which you have defined the primary key. You can use this to get columns on which the primary key is based. I find it very useful when i need to define the FK relationship for other tables in PowerDesigner. Try to do the […]
2003-04-16
1,624 reads
Use this script to get Insert, Update and Delete trigger for all the tables. This script will give you just the first level of triggers. So if you have more than 1 insert trigger, it will give you the first one.Mohit NayyarMCP (.Net), MCSD, MCDBA
2003-04-14
266 reads
I had an excellent group of people in Gothenburg Sweden when I taught there...
By Steve Jones
How can I quickly get a CU patch for a system that’s out of...
Data analysis is all about wrangling massive datasets. To do that efficiently, you need...
Comments posted to this topic are about the item GIT Configuration and Automated Release...
hi a peer of mine recalls an error in an edi app that often...
Hello SSC! First, I would like to thank everyone who has responded to my...
I have created these triggers in SQL Server 2022:
CREATE TRIGGER triggertest_tri_1 ON dbo.triggertest FOR INSERT AS PRINT 'one' GO CREATE TRIGGER triggertest_tri_2 ON dbo.triggertest FOR INSERT AS PRINT 'two' GOI want to be sure that the trigger with "1" runs first. I decide to run this:
EXEC sp_settriggerorder@triggername = 'triggertest_tri_1', @order = 'first'What happens? See possible answers