Top "Tsql" questions

T-SQL (Transact Structured Query Language) is the extension of SQL functionality supported by Sybase ASE and Microsoft SQL Server.

How do I generate random number for each row in a TSQL Select?

I need a different random number for each row in my table. The following seemingly obvious code uses the same …

sql-server tsql sql-server-2000
Not equal <> != operator on NULL

Could someone please explain the following behavior in SQL? SELECT * FROM MyTable WHERE MyColumn != NULL (0 Results) SELECT * FROM MyTable WHERE …

sql sql-server tsql null
Create a date from day month and year with T-SQL

I am trying to convert a date with individual parts such as 12, 1, 2007 into a datetime in SQL Server 2005. I have …

sql sql-server sql-server-2005 tsql
How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

I would like to write a single SQL command to drop multiple columns from a single table in one ALTER …

sql sql-server tsql alter
How to identify all stored procedures referring a particular table

I created a table on development environment for testing purpose and there are few sp's which are refreing this table. …

sql tsql sql-server-2005
T-SQL: Selecting rows to delete via joins

Scenario: Let's say I have two tables, TableA and TableB. TableB's primary key is a single column (BId), and is …

tsql join
How to pass an array into a SQL Server stored procedure

How to pass an array into a SQL Server stored procedure? For example, I have a list of employees. I …

c# sql-server tsql stored-procedures
IDENTITY_INSERT is set to OFF - How to turn it ON?

I have a deleted file archive database that stores the ID of the file that was deleted, I want the …

sql sql-server tsql
How to do SQL Like % in Linq?

I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as …

.net linq tsql linq-to-entities sql-like
Check if table exists and if it doesn't exist, create it in SQL Server 2008

I am writing a Stored procedure in SQL Server 2008. I need to check if a table exists in the database. …

sql sql-server tsql sql-server-2008-r2