Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Database Development > SQL > Transact-sql

Transact-sql

1-20 of 388     Previous     Next
How to Read Environment Variables in SQL Server Using T-SQL
by Deepak Choudhari
The xp_cmdshell extended stored procedure in SQL Server enables you to read environment variables in T-SQL.
A Better Way to Retrieve the ID of the Last Inserted Record
by Martin Vitek
An update to a previous tip on retrieving the ID of the last inserted record, this version uses less code and avoids a search of the jobs table.
Choosing a Large-Text Data Type for SQL Server Table Columns
by Deepak Choudhari
SQL Server offers several different data types for storing large amounts of data in table columns. But which should you use?
Avoid Multiple Queries When Querying for Max and Min Values
by Cindy Rodriguez
Instead of making one query to get the Max and Min values for a column, and then making another query to get additional information about those rows, you can do it all in one query.
Discover Long-Running Queries
by Srinath MS
Let SQL Server tell you which queries take the longest to run.
Find All User-Defined Functions in a SQL Server Database
by Jaya Nehru
This query returns all the user-defined functions in the specified database.
Run a Partial Query in TOAD
by Chithra Vijayan
You can run any portion of a SQL command in TOAD, even if it's embedded in a larger query.
Table Variables Are More Efficient than Temporary Tables In Some Cases
by Srinath MS
Using @TABLE rather than temporary tables improves performance for small tables that don't require indexes.
Rebuild All Table Indexes in a SQL Server Database with One Command
by Srinath MS
An undocumented stored procedure lets you refresh all the table indexes in a SQL Server database with a single command.
Explore the Statements and Parameters Passed to SQL Server
by Cindy Rodriguez
Find out exactly what statements and parameters are passed to SQL Server.
Execute a Block of Text in SQL Server Management Studio
by Cindy Rodriguez
In SQL Server Management Studio, you can use the Alt key in your keyboard to select blocks of text to execute.
Create XML from an Array
by Cindy Rodriguez
Passing arrays as arguments to stored procedures is not currently possible in SQL Server, but you can use XML to accomplish this.
Debugging SQL Server Stored Procedures Through Visual Studio.NET
by Srinath MS
Learn how to use Visual Studio.NET to debug SQL Server stored procedures.
Calculate the Last Day of the Month for Any Given Date
by Raja Krishna
The code in this tip calculates the last day of the month for any given date.
Determine the Version and Build Information for Microsoft SQL Server
by Alexander Ocher
Use the query shown in this tip to determine the version and build information for Microsoft SQL Server.
Obtain Information About Table Columns in Microsoft SQL Server
by Alexander Ocher
To obtain information about table columns in Microsoft SQL Server, use the INFORMATION_SCHEMA.COLUMNS view.
Testing Compatibility Between SQL Server Versions
by Srinath MS
When migrating SQL code (stored procedures, triggers, etc.) to newer versions, it's not uncommon to have to rewrite your entire back-end code. However, a simpler solution is to check the exisiting code's compatibility with the newer versions.
Returning a Random set of Records
by Parthasarathy Mandayam
Find out how to use the NEWID() function to return a random set of records.
Determine Whether a Table Has an Identity Column
by Jaya Nehru Kumar
A simple, single line of code helps you determine whether a table has an identity column.
The Purpose of the GO Statement
by Sachin Kainth
Although GO is not a T-SQL statement, it is often used in T-SQL code and unless you know what it is it can be a mystery. Find out its purpose in this tip.
1-20 of 388     Previous     Next
Sitemap