This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next >> |
SQL Server NOWAIT HintSQL Server NOWAIT Hint
In some situations it can be necessary to fail quickly when a query is blocked, rather than wait for locks to be released. This can be achieved simply using the NOWAIT hint.
SQL Server Connection ColoursSQL Server Connection Colours
SQL Server Management Studio allows multiple concurrent connections to different servers and instances. This can be risky when connecting to live, test and development systems at the same time.
Identifying the Current SQL Server LoginIdentifying the Current SQL Server Login
Some queries and other operations should yield different results depending upon the user executing them. Sometimes this can be controlled by standard SQL Server security. When it cannot, it may be necessary to identify the current user from Transact-SQL.
Obtaining a List of SQL Server DatabasesObtaining a List of SQL Server Databases
SQL Server includes a number of system stored procedures that allow information to be obtained about the server or instance. One useful stored procedure is sp_Databases, which returns a list of the available databases.
Using Sequences in SQL ServerUsing Sequences in SQL Server
SQL Server 2012 introduced the concept of sequences. These allow the automatic generation of series of numbers. They are similar to identity columns but do not need to be linked to a column.
Paging in SQL Server with OFFSETPaging in SQL Server with OFFSET
When working with large data sets it is common to retrieve a limited number of rows at a time and allow the user to page through the results. With SQL Server 2012, the paging can be controlled by the database engine, using new options of the ORDER BY clause.
Raising Errors in Transact-SQLRaising Errors in Transact-SQL
When developing reusable scripts, such as stored procedures and triggers, it is often necessary to raise errors. With the RAISERROR command, it is possible to create errors with varying severity and customised messages.
Obtaining the Current Database NameObtaining the Current Database Name
When developing stored procedures or functions that are to be reused by multiple databases, it may be necessary to obtain the name of the current database. This can be achieved using a metadata function.
Determining the Length of SQL Server Text DataDetermining the Length of SQL Server Text Data
When it is necessary to determine the length of character data in SQL Server, the Len function can be used. This function is not compatible with Text or NText data, so an alternative approach is required.
Preventing Overlapping Ranges in SQL ServerPreventing Overlapping Ranges in SQL Server
In some scenarios it is necessary to store ranges in a table in SQL Server. If those ranges should not be permitted to overlap, this can be prevented using a combination of constraints and a trigger.
<< Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next >> |