Once data is in a table it needs to be maintained. New records will need to be added, and existing records will need to be updated, and/or deleted. To keep data maintained, the insert, update or delete actions may need to be performed. This article will show how those three data manipulation language (DML) actions can be synchronized together within a single basic MERGE statement.… Read more
Over time data in SQL Server tables needs to be modified. There are two major different aspects of modifying data: updating and deleting. In my last article “Updating SQL Server Data” I discussed using the UPDATE statement to change data in existing rows of a SQL Server table. In this article I will be demonstrating … Read more
Once data is inserted into a table, data typically needs to be maintained as time goes on. To make changes to an existing row or a number of rows, in a table, the UPDATE statement is used. This article shows how to use the UPDATE statement to modify data within a SQL Server table. Syntax … Read more
Before data can be read from of a SQL Server database table, the table needs to contain rows of data. One of the most typical ways to get data into a table is to use the INSERT statement. One row or multiple rows can be inserted with a single execution of an INSERT statement. You … Read more
To guarantee the order of a result set, you must use an ORDER BY clause. In this article, Greg Larsen explains what you need to know about ORDER BY.… Read more
It’s important to choose the right datatypes when designing a database. Greg Larsen explains the differences between CHAR, VARCHAR and VARCHAR(MAX).… Read more
SQL Server provides two ways to include an incrementing number in a table. Greg Larsen explains how to replace an identity column with a sequence number.… Read more
Developers can work with multiple range values at once using sp_sequence_get_range. Greg Larsen explains how to return multiple sequence numbers with sp_sequence_get_range.… Read more
SQL Server sequence objects have several properties that control how they behave. Greg Larson explains the options of using SQL Server sequence objects.… Read more
SQL Server sequence objects can be used in place of identity columns. In this article, Greg Larsen explains how to set up and use sequence objects.… Read more
SQL Server identity columns are easy to add to a table, but you must understand how they work to use them effectively. In this article, Greg Larsen explains the nuances of SQL Server identity columns.… Read more
The SQL Server identity column is used to populate a column with incrementing numbers on insert. In this article, Greg Larsen explains how it works.… Read more
DBAs can control many aspects of SQL Server’s behavior with trace flags. In this article, Robert Sheldon explains how to enable SQL Server trace flags.… Read more
The SQL Server transaction log must be managed to keep a database running and performing well. In this article, Greg Larsen explains how to manage the transaction log size.… Read more
The transaction log file for a SQL Server database critical for for maintaining database integrity. In this article, Greg Larsen explains SQL Server transaction log architecture.… Read more