By Bill McEvoy, 04/28/2009
The final lesson in the T-SQL 101 series shows you how to create and execute stored procedures that get data into and out of databases.
By Bill McEvoy, 09/29/2008
T-SQL offers three types of built-in functions, including scalar functions. Scalar functions let you perform a wide variety of operations, such as retrieving dates and replacing ...
By Bill McEvoy, 08/29/2008
Using T-SQL's CASE function, you can quickly transform numerical codes and other hard-to-decipher data into meaningful information.
By Bill McEvoy, 08/28/2008
The virtual nature of a view is its greatest strength and its greatest weakness. Here's what you need to know to create views and use them wisely.
By Bill McEvoy, 08/28/2008
Learn how indexed views differ from regular views.
By Bill McEvoy, 08/28/2008
Learn how to retrieve values from a table and store the results.
By Bill McEvoy, 07/30/2008
Creating a table "the old fashioned way" leads to a better understanding of the table and its columns. Plus, the resulting T-SQL code documents the table's structure and lets you ...
By Bill McEvoy, 06/27/2008
Understand the differences between inner, outer, and cross joins before you use them in your queries.
By Bill McEvoy, 05/28/2008
Thanks to the GROUP BY clause, you can write SELECT queries that produce detailed reports.
By Bill McEvoy, 04/29/2008
SELECT queries aren't just for retrieving data. You can also summarize that data by incorporating COUNT, MIN, MAX, AVG, and SUM functions into SELECT queries.
By Bill McEvoy, 04/29/2008
Ensuring that databases are being backed up properly is an important but time-consuming task, especially for DBAs who manage multiple servers and databases. The sp_ShowBackups ...
By Bill McEvoy, 03/28/2008
If you have to perform a full index analysis, here are two T-SQL stored procedures you can use to get detailed information about the indexes in a single table or an entire ...
By Bill McEvoy, 03/28/2008
Using a database named MyDB, a table named MyTable, and some dummy tables, you can learn how to create T-SQL queries that insert new data, update existing data, and delete old ...
By Bill McEvoy, 02/28/2008
Whether you are new to T-SQL or you just want to brush up on the basics, you'll want to read and save this guide that walks you through how to write SELECT statements. Learn how ...
By Bill McEvoy, 01/25/2008
Using SQL Server Management Studio (SSMS) to document job schedules involves a lot of mouse-clicking and cutting and pasting. You can avoid all that hassle by using the ...
By Bill McEvoy, 10/25/2007
Here's a stored procedure that consolidates the basic functions of osql and bcp. Switching between these utilities' output is simply a matter of changing the value of an input ...
By Bill McEvoy, 04/19/2007
Here's a search engine that targets SQL-related Web sites, which means you can enter fewer parameters when conducting searches for SQL material.
By Bill McEvoy, 03/22/2007
Using sp_ShowErrors to view SQL Server errorlog files is time-saving alternative to manually reviewing them in Enterprise Manager.
By Bill McEvoy, 02/23/2007
The sp_ListTriggers stored procedure lets you list all the triggers in the current database or the triggers in a specific table.
By Bill McEvoy, 09/21/2006
If you've ever had users call to tell you that a SQL Server database is slow, you'll likely find sp_Now a handy tool. This stored procedure determines what processes are currently ...