T-SQL (Transact Structured Query Language) is the extension of SQL functionality supported by Sybase ASE and Microsoft SQL Server.
Got a complex SELECT query, from which I would like to insert all rows into a table variable, but T-SQL …
sql-server tsql insert table-variableCan you help me with SQL statements to find duplicates on multiple fields? For example, in pseudo code: select count(…
sql sql-server tsql sql-server-2008How to change the column size of the salary column in the employee table from numeric(18,0) to numeric(22,5)
sql sql-server database tsql alter-tableWhat is the main purpose of using CROSS APPLY? I have read (vaguely, through posts on the Internet) that cross …
sql sql-server performance tsql cross-applyUsing MSSQL2005, can I truncate a table with a foreign key constraint if I first truncate the child table (the …
sql-server sql-server-2005 tsql truncate foreign-keysI am trying to change a column from a varchar(50) to a nvarchar(200). What is the SQL command to alter …
sql-server tsql type-conversion alter-tableHow do I get a list of all index & index columns in SQL Server 2005+? The closest I could get …
sql-server tsql indexing reverse-engineeringLet's say I have the following simple table variable: declare @databases table ( DatabaseID int, Name varchar(15), Server varchar(15) ) -- insert …
sql-server tsql loopsThis isn't working in SQL Server 2008: ALTER TABLE Employee ALTER COLUMN CityBorn SET DEFAULT 'SANDNES' The error is: Incorrect syntax …
sql-server sql-server-2008 tsql default-valueI have a stored procedure that returns 80 columns, and 300 rows. I want to write a select that gets 2 of those …
sql-server tsql select stored-procedures