SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Articles with tag T-SQL Rss

Search for any content tagged t-sql

<< Newer    Items 21 to 40 of 1294    Older >>
 

Simple SQL: Attribute Splitting

If the design of a relational database is wrong, no amount of clever DML SQL will make it work well. Dr. Codd’s Information Principle is that you have, inside the entity tables, the columns that model the attributes of that entity. The columns contain scalar values. Tables that model relationships can have attributes, but they must have references to entities in the schema. You split those attributes at your peril. Joe Celko explains the basics.  Read more...
By Additional Articles 2017/07/18 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 3,695 reads

The Panjandrum Conundrum

With progress thwarted by a committee of panjandrums, will T-SQL forever remain in the doldrums? So wonders Phil Factor.  Read more...
By Phil Factor 2017/07/10 | Source: SQLServerCentral.com | Category: editorial
Rating: |  Discuss |   Briefcase | 71 reads

The Basics of Good T-SQL Coding Style

TSQL Code must work properly and efficiently. That's not enough though. Unless you are working alone, have perfect memory and plan to never change job, then you need to comment and document your code, it must be inherently readable, well laid out, use informative and obvious names, and it must be robust and resilient; written defensively. It must not rely on deprecated features of SQL Server, or assume particular database settings. Robert Sheldon starts a series of articles that explains the basics.  Read more...
By Additional Articles 2017/07/05 | Source: SimpleTalk | Category: t-sql
Rating:  Rate this |   Briefcase | 6,464 reads

SQL Server Row Count for all Tables in a Database

Dattatrey Sindol explains the different ways in which you can get the row counts from all the tables in a SQL Server database.  Read more...
By Additional Articles 2017/06/22 | Source: MSSQLTips.com | Category: row count
Rating: (not yet rated)  Rate this |   Briefcase | 5,335 reads

Use T-SQL to Find Folders Using the Most Disk Space

Your SQL Server drives are running out of disk space and you want a way to quickly tell which sub-directories are taking the most space - here's how to do it with T-SQL.  Read more...
By Additional Articles 2017/06/16 | Source: MSSQLTips.com | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 4,803 reads

Setting Variables in Calling T-SQL Code While Using sp_executesql

In this tip, Greg Larsen shows you how to set variables in your calling T-SQL code when using sp_execute sql.  Read more...
By Additional Articles 2017/06/14 | Source: Database Journal | Category: variables
Rating: (not yet rated)  Rate this |   Briefcase | 3,705 reads

The OUTPUT Clause for the MERGE Statements

In this article, I will provide a set of examples to showcase the use of OUTPUT clause within the MERGE statement and how to capture the OUTPUT clause results into an archive table.  Read more...
By Amarendra Reddy Thummeti 2017/06/08 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 6,906 reads

The OUTPUT Clause for UPDATE Statements

In this article, I will provide a set of examples to showcase the use of OUTPUT clause in capturing the results of the updated rows into a table variable for the UPDATE statements.   Read more...
By Amarendra Reddy Thummeti 2017/06/06 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,393 reads

Why Scalar Functions Can Be Costly

Scalar user defined functions can be costly in more ways than you know. Watch Mickey Stuewe show the hidden costs of using them incorrectly.  Read more...
By Mickey Stuewe 2017/06/02 (first published: 2016/01/04) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 10,448 reads

The OUTPUT Clause for INSERT & DELETE Statements

In this article, I will provide a set of examples to show case the use of OUTPUT clause for INSERT and DELETE statements.  Read more...
By Amarendra Reddy Thummeti 2017/05/25 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 4,412 reads

Forecasting with SQL

Can you use SQL Server to extrapolate out trends from your data? Lots of companies would have you buy a BI solution instead, but new author Mark Wojciechowicz brings us a great example of how you could forecast something in T-SQL.  Read more...
By Mark Wojciechowicz 2017/05/19 (first published: 2010/02/09) | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 17,016 reads

Some of my greatest mistakes

You are never too experienced to make mistakes. An occasional dose of humble pie serves as a reminder to up our game.  Read more...
By David Poole 2017/05/18 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,716 reads

OUTPUT Clause Basics (For Inserts and Deletes)

When INSERTING or DELETING rows from a table, the OUTPUT clause can be used to return a dataset containing the changes made. Mat Richardson explains how.  Read more...
By Mat Richardson 2017/05/02 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,061 reads

Should I Type * or 1 With the EXISTS Logical Operator

In my project I see that people writes different things with EXISTS logical operator (EXISTS (SELECT StarOrOne FROM...)). They are "*", "1" and even "TOP 1 1" or "TOP 1 *". The aim of this article to give a good explanation which option is the best.  Read more...
By Viacheslav Maliutin 2017/04/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 3,328 reads

Nuance of datetime data type in SQL Server

One of the most confusing data types in SQL Server is the datetime datatype.  Read more...
By Leo Peysakhovich 2017/04/13 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 1,928 reads

Performaing a Right and Comprehensive Age Calculation Part 2

Age Calculation gets implemented as an Inline table Valued function with a parameter defining which date parts must be counted.  Read more...
By Sergiy Floka 2017/03/30 | Source: SQLServerCentral.com | Category: age calculation
Rating: |  Discuss |   Briefcase | 936 reads

Performing a Right and Comprehensive Age Calculation

Age calculation based on the right method used in real life.   Read more...
By Sergiy Floka 2017/03/28 | Source: SQLServerCentral.com | Category: datetime conversions
Rating: |  Discuss |   Briefcase | 1,745 reads

Adding Years, Months and Days

Adding Years, Months and Days to Years, Months and Days, with Bonus UK Public Holiday calculation.  Read more...
By Pete Revell 2017/03/14 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 2,226 reads

Detective Stories - Tracking Down the Database's Dependents Part 2

No worries about dropping databases. Now we can search for its dependencies before the database dies. Part 2 of a 2-part article.  Read more...
By Brandie Tarvin 2017/03/07 | Source: SQLServerCentral.com | Category: database dependencies
Rating: |  Discuss |   Briefcase | 960 reads

Detective Stories - Tracking Down the Database's Dependents Part I

No worries about dropping databases. Now we can search for its dependencies before the database dies. Part 1 of a 2-part article.  Read more...
By Brandie Tarvin 2017/03/06 | Source: SQLServerCentral.com | Category: database dependencies
Rating: |  Discuss |   Briefcase | 1,248 reads
<< Newer    Items 21 to 40 of 1294    Older >>