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)

2007-02-26 (first published: )

626 reads

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)

2007-01-02 (first published: )

158 reads

Blogs

First Time Speaking at PASS Summit

By

This week, I filmed my experience as a first time speaker at PASS Summit...

Azure SQL Best Practices?

By

A way to enforce good practice and standards is by Azure Policy. As stated...

Azure Data Studeo- Nov 2019 Release

By

SQL Server Management studio is now can be installed separately not part of SQL...

Read the latest Blogs

Forums

0 Rows Affected - Requires a value Returned

By Buddy84

Hi, I'm currently using Zabbix Monitoring and when connecting via ODBC, I'm executing the...

multi-subnet failover sql cluster

By vsamantha35

Hi All, Have a question related for multi-subnet AG. Trying to understand behaviour of...

Multi select parameter does not work in WHERE clause

By CopWorker

Hello, I´m using a SyBase SQL Anywhere 17 Database. Then I want to create...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers