• Interests: Vedic Maths

Technical Article

Locate primary key - foreign key relations

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 […]

4.14 (7)

You rated this post out of 5. Change rating

2011-09-14 (first published: )

2,736 reads

Technical Article

Combine multiple rows into single output

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/

5 (3)

You rated this post out of 5. Change rating


3,723 reads

Technical Article

To Get Latest SQL Job Status

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 […]

3.54 (13)

You rated this post out of 5. Change rating


8,361 reads

Technical Article

Error Handling in SQL Server (like Visual Basic)

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

1 (1)

You rated this post out of 5. Change rating


921 reads

Technical Article

To get Table and column name for Primary Keys.

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 […]

5 (2)

You rated this post out of 5. Change rating


1,468 reads


Penetration Testing your SQL Server, Part 1 – The Recon Mission


Since witnessing a rather nasty cyber attack around a year ago, I’ve been thinking...

SQL Saturday Denver 2023–VCS Primer for the Database slides


My slides are here: VCS Primer Denver 2023 This was an overview of what...

Future Data Driven 2023 is This Week


The Future Data Driven 2023 virtual conference is coming on Wednesday, September 27. Register...

Read the latest Blogs


upgrade evalution editon reporting services to Stanadard

By Shivrudra

Hi All, I installed reporting services evaluation edition for testing purpose, but now 180...

cost threshold for parallelism value to be set

By bobrooney.81

Hi Everyone, Why and when should be set 'cost threshold for parallelism'? We are...

Master Data - Relational or Dimensional modeling?

By river1

Dears, In my company, we have certain master data domains like customer; Vendor; Product;...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers