Technical Article

Find possible missing foreign key relationships

This procedure is intended for single column primary key relationships.First we will create two table functions. The first finds a list of all tables with their primary key columns. The second finds all existing foreign key relationships with their table and column names. Finally we find all tables with primary key column names that do […]

5 (2)

You rated this post out of 5. Change rating

2007-02-26 (first published: )

903 reads

Technical Article

Date String format with optional Timestamp

I find it so annoying to format dates. Sometimes I want to include the timestamp, but if it is a midnight time stamp, the time is irrelevant. Sending in a datetime will return either the date string or a date string with a timestamp up to the seconds with either AM or PM.

5 (1)

You rated this post out of 5. Change rating

2007-01-02 (first published: )

180 reads

Blogs

How Long Will It Take to Learn SQL? The Truth Might Surprise You

By

In today's data-driven world, SQL (Structured Query Language) is a blazing-hot skill. It's your...

Flying Halfway Around the World to Australia

By

I leave tonight for Australia. I was in London 3 days ago, so this...

Dealing with Change – Two Resources

By

As I look at the state of information technology today, I see one constant:...

Read the latest Blogs

Forums

Table with FK(s) to other columns within the table

By BOR15K

Hello All, I have recently joined a project, where main, core tables with millions...

SQL 2017 throwing BugCheck on differential database restore

By arran.franklin

Long time listener, first time caller. I have a problem that my usual bag...

cluster node quarantined

By StillaLearner

evening All hoping someone can shed some light - I have a (originally) 2...

Visit the forum

Question of the Day

Using Table Hints in a Query

How many table hints can I include in a query?  

See possible answers