Skip to content
Seven Days of Schema - Daily adventures in database development. By Rick Bishop

Seven Days of Schema

Database development, all week long.

  • About Me
  • Tech
  • T-SQL
  • C#
  • Projects
  • Reviews
  • Contact

Tag: FROM

How to Return Details about Every Key Constraint Defined on a Database

September 24, 2018October 5, 2018 ~ Rick Bishop ~ Leave a comment

Tested on server version: SQL Server 2016 Developer Edition Reference info accurate on: January, 2018 was wanting to make THIS stored procedure:

Querying Stored Procedure and System Function Parameter Information

June 15, 2018June 29, 2018 ~ Rick Bishop ~ Leave a comment

Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018The following snippet generates a SQL Server View that displays information about the parameters that need to be passed in to System Objects. The data type information that is returned in this view is human readable (i.e. `nvarchar(200) NULL`), rather than the numeric type … Continue reading Querying Stored Procedure and System Function Parameter Information

Show ROW NUMBERS in T-SQL RESULT set

June 15, 2018July 6, 2018 ~ Rick Bishop ~ Leave a comment

Tested on: SQL Server 2016 Developer Edition Accurate as of: January, 2018 In this query, I've added a record number column to the result set using OVER and ORDER BY clauses with the ROW_NUMBER function in T-SQL. Note that the ORDER BY clause is required. The OVER() clause tells the SQL Engine to sort data … Continue reading Show ROW NUMBERS in T-SQL RESULT set

Return DDL from METADATA

June 8, 2018August 12, 2018 ~ Rick Bishop ~ Leave a comment

Tested on server version: SQL Server 2016 Developer Edition Reference info accurate on: January, 2018 The following script demonstrates how to generate each column's DDL from metadata in Transact-SQL. Example Output: T-SQL [code language="sql"] DECLARE @rundate datetime2 = getdate(); DECLARE @default_collation nvarchar(128); -- = 'SQL_Latin1_General_CP1_CI_AS'; SELECT @default_collation = convert(sysname, serverproperty('collation')) SELECT TABLE_CATALOG ,TABLE_SCHEMA ,TABLE_NAME ,COLUMN_NAME … Continue reading Return DDL from METADATA

Return all System Object Definitions (DDL)

May 30, 2018July 23, 2018 ~ Rick Bishop ~ Leave a comment

Tested on server version: SQL Server 2016 Developer Edition Reference info accurate on: January, 2018 The following view returns a comprehensive list of all System Objects on a server. It returns the object name, with and without concatinating the schema to the name. The view can be created and executed as-is.

This isn't a Google ad. Bluehost is a great value and I couldn't be happier, so give them a try.
Bluehost Logo

RSS US CERT Alerts

Recent Posts

  • C# System.Uri Class Examples
  • C# Basics – Access Modifiers
  • C# Coding Style
  • C# Basics – Inheritance
  • 5 Reasons to Lock Down Your LinkedIn Profile
Privacy Policy | Hire Rick Bishop | Security Today | RSS | Sitemap
Proudly powered by WordPress ~ Theme: Penscratch 2 by WordPress.com.