Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

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

Transact-sql - Page 2

21-40 of 389     Previous     Next
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.
Retrieve All Columns from Each Table in Every Database
by Mohammad Khan
This stored procedure retrieves all the columns of each table in every database.
Finding a SQL Server Object
by Srinath MS
Use this code to find a SQL Server object, even if the database name is unknown.
Selecting One Record Before and After a Value
by Srinath MS
Find out how to select one record before and after a value.
Constructing Strings of Repeated Characters in T-SQL
by Srinath MS
Learn how to use the Repliciate() function to display a set of characters for a specified length.
Find All User Tables, Columns, DataTypes, and Length
by Daljinder Singh
Use this code to determine all your user tables, plus their columns, datatypes, and length.
Locate All Stored Procedures and Their Objects/SQL Tables
by Daljinder Singh
This code shows you how to you need to locate all the stored procedures and objects/SQL tables upon which they depend.
Using SELECT * on a Table with the Column Type NTEXT
by Steve Skelton
Find out how to ensure that your NTEXT contents display when you've used SELECT * on table with the column type.
Achieving IIF Functionality in T-SQL
by Jaya Nehru Kumar
Although T-SQL doesn't provide an IIF command, you can get equivalent functionality using the SELECT CASE command.
Check for the Existence of a Stored Procedure Using T-SQL
by Jaya Nehru Kumar
Find out how you can use T-SQL to check for the existence of a stored procedure.
Some Useful TSQL Code Snippets for Beginners
by Vadivel Mohanakrishnan
For the benefit of the newbies in SQL Server, here's a list of a few basic queries.
View the Source Code of Stored Procedures in Yukon
by Vadivel Mohanakrishnan
This tip explains how to display the definitions of user-defined stored procedures and system stored procedures in SQL Server 2005 (code named Yukon).
Using T-SQL to Check Whether a Table Exists
by Jaya Nehru Kumar
Use this simple query to check for the existence of a table in a database.
Reset the Identity for All User Tables
by Jaya Nehru Kumar
This tip provides a stored procedure for resetting the identity of all your user tables.
Create and Drop Stored Procedures as a Group
by Jaya Nehru Kumar
Ever created a bunch of stored procedures for testing purposes and went to drop them but couldn't remember all the names you created? A way to avoid this is to group multiple stored procedures under a single name.
Add SQL Text Fields
by Parthasarathy Mandayam
Text fields need special treatment in SQL and this tip shows you how to add two of them.
Locate the Installed Version of MS SQL Server
by Jaya Nehru Kumar
Use this query to determine what version, Service Packs, and editions of MS SQL Server are installed on a given machine.
Manipulate Stored Procedure Resultsets as If They Were Simple Queries
by Parthasarathy Mandayam
Find out how to replace a simple SELECT with a stored procedure without losing direct control over the resultset.
Getting the Week Start Date and Week End Date in SQL
by Raj Chidipudi
Suppose you're given a date and asked to retrieve data for the whole week in which the given date falls. The example code in this tip produces the Week Start Date and Week End Date.
Start MS-SQL Server Jobs from the Query Analyzer
by Somaiah Manukonda
This code shows you how to start a job from the Query Analyzer.
21-40 of 389     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date