Brian Knight

Brian Knight, MCSE, MCDBA, is on the Board of Directors for the Professional Association for SQL Server (PASS) and runs the local SQL Server users group in Jacksonville. Brian is a contributing columnist for SQL Magazine and also maintains a weekly column for the database website SQLServerCentral.com. He is the author of Admin911: SQL Server (Osborne/McGraw-Hill Publishing) and co-author of Professional SQL Server DTS (Wrox Press). Brian is a Senior SQL Server Database Consultant at Alltel in Jacksonville and spends most of his time deep in DTS and SQL Server.

Technical Article

Set Extended Properties for Every Table

Extended properties are a neat feature in SQL Server 2000 that let you set meta data for an individual object. This stored procedure is a baseline sproc that lets you set the properties of every object in a DB to a given value. For example, if you baseline your database at 1.5.0, you can set […]

You rated this post out of 5. Change rating

2005-03-02 (first published: )

194 reads

Technical Article

sp_MSforeachfk-Perform an action on every FK

This stored procedure loops through each user defined Foreign Key and performs an action on that FK, like disabling them or printing its name. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. .Shortened version of the usage (there are […]

You rated this post out of 5. Change rating

2002-06-14

656 reads

Technical Article

sp_MSforeachsproc -Perform an action on each sproc

This stored procedure loops through each view and performs an action on that stored procedure, like printing the records or running an sp_help. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp.Shortened version of the usage (there are a lot […]

You rated this post out of 5. Change rating

2002-06-14

1,362 reads

Technical Article

sp_MSforeachtrigger-Perform action on each trigger

This stored procedure loops through each trigger and performs an action on that trigger , like disabling or printing it. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. Shortened version of the usage (there are a lot more parameters […]

You rated this post out of 5. Change rating

2002-06-14

658 reads

Technical Article

sp_MSforeachview - Perform an action on each view

This stored procedure loops through each view and performs an action on that view, like counting or printing the records. Please install this stored procedure in the MASTER database. For full usage instructions and advanced parameters please see the article about it at http://www.sqlservercentral.com/columnists/bknight/sp_msforeachworker.asp. Shortened version of the usage (there are a lot more parameters […]

You rated this post out of 5. Change rating

2002-06-14

1,947 reads

Technical Article

Detect the Amount of Wasted Data Space in a Table for 2000

SP_WASTED_SPACE will run through each column in your database and print a report of all the character columns. It will then print a report with :* The maximum length that a column is storing* The average length of data stored in each column* The amount of wasted space in each column* Hints on how to […]

You rated this post out of 5. Change rating

2002-03-14

1,117 reads

Blogs

Unlock the Power of Your Data: From Basic to Advanced Data Analysis

By

Data isn't just about numbers and spreadsheets. It holds stories, patterns, and the answers...

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Webinar – Microsoft Fabric for Dummies

By

On Wednesday May 15th 2024 I will give a free webinar on MSSQLTips.com about...

Read the latest Blogs

Forums

The "ORDER BY" clause behavior

By Alessandro Mortola

Comments posted to this topic are about the item The "ORDER BY" clause behavior

Are IT Certifications Still Relevant?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Are IT Certifications Still Relevant?

SQL-CTE reqursive query

By jjjohn

I have table TicketNumbers i     TicketNumber  UID 2    10                        09901a22c7c3acc6786847c775f1d113 6    5                          00dad28bef21f916240d6e8c1c1bd67d 12 ...

Visit the forum

Question of the Day

The "ORDER BY" clause behavior

Let’s consider the following script that can be executed without any error on both SQL Sever and PostgreSQL. We define the table t1 in which we insert three records:

create table t1 (id int primary key, city varchar(50));

insert into t1 values (1, 'Rome'), (2, 'New York'), (3, NULL);
If we execute the following query, how will the records be sorted in both environments?
select city

from t1

order by city;

See possible answers