Tag: tsql

3169 How do I UPDATE from a SELECT in SQL Server? 2010-02-25T14:36:53.113

1637 How to check if a column exists in a SQL Server table? 2008-09-25T12:34:00.093

1492 How to return only the Date from a SQL Server DateTime datatype 2008-09-22T03:31:33.277

1419 Inserting multiple rows in a single SQL query? 2009-01-17T05:55:54.150

1383 Insert results of a stored procedure into a temporary table 2009-03-17T10:45:26.080

1311 LEFT JOIN vs. LEFT OUTER JOIN in SQL Server 2009-01-02T08:30:10.297

1285 How do I perform an IF...THEN in an SQL SELECT? 2008-09-15T14:34:09.337

1182 How can I remove duplicate rows? 2008-08-20T21:51:29.780

1087 How can I do an UPDATE statement with JOIN in SQL? 2009-08-18T11:40:07.273

1073 Altering a column: null to not null 2009-03-27T13:24:29.177

962 Get size of all tables in database 2011-10-25T16:14:34.197

928 Best way to get identity of inserted row? 2008-09-03T21:32:02.587

923 Check if table exists in SQL Server 2008-10-03T16:00:33.803

923 Find all tables containing column with specified name - MS SQL Server 2011-01-31T10:12:26.260

795 When should I use Cross Apply over Inner Join? 2009-07-16T17:42:21.513

764 How do I get list of all tables in a database using TSQL? 2008-10-06T17:53:21.950

758 How can foreign key constraints be temporarily disabled using T-SQL? 2008-10-01T18:33:43.630

730 How do I escape a single quote in SQL Server? 2009-10-19T01:18:22.493

716 Update a table using JOIN in SQL Server? 2009-10-21T22:48:11.393

713 Should I use != or <> for not equal in T-SQL? 2009-04-06T20:56:15.100

704 Function vs. Stored Procedure in SQL Server 2009-07-24T19:40:06.827

647 DateTime2 vs DateTime in SQL Server 2009-08-26T11:45:10.697

618 SQL Server: How to Join to first row 2010-01-11T16:44:37.123

604 How can I list all foreign keys referencing a given table in SQL Server? 2009-01-27T12:17:59.193

555 SQL exclude a column using SELECT * [except columnA] FROM tableA? 2009-04-08T09:15:28.297

549 SQL update query using joins 2009-06-11T18:49:33.633

541 How can I get column names from a table in SQL Server? 2009-06-28T14:05:50.193

518 How do I create a unique constraint that also allows nulls? 2009-04-20T10:12:55.640

502 SQL Server: CASE WHEN OR THEN ELSE END => the OR is not supported 2011-03-30T14:45:11.100

466 How do I insert multiple rows WITHOUT repeating the "INSERT INTO dbo.Blah" part of the statement? 2010-04-12T19:18:48.600

465 T-SQL: Selecting rows to delete via joins 2009-01-13T16:45:21.600

459 How do I split a string so I can access item x? 2008-08-05T18:15:47.727

456 Best approach to remove time part of datetime in SQL Server 2009-07-24T12:49:54.420

410 What is the significance of 1/1/1753 in SQL Server? 2010-07-22T15:28:52.350

404 Select statement to find duplicates on certain fields 2010-12-13T22:30:06.130

401 Get top 1 row of each group 2011-07-27T08:41:16.790

399 Select columns from result set of stored procedure 2008-10-16T16:44:42.447

368 Cannot truncate table because it is being referenced by a FOREIGN KEY constraint? 2008-10-31T15:06:41.080

355 How to do SQL Like % in Linq? 2009-05-07T16:43:26.437

348 Replace a newline in TSQL 2009-06-04T16:10:33.953

332 SQL Server SELECT into existing table 2010-11-04T21:49:42.100

328 How to select all records from one table that do not exist in another table? 2010-04-21T20:18:25.207

326 Sleep Command in T-SQL? 2009-03-20T03:39:52.320

325 SQL Server query - Selecting COUNT(*) with DISTINCT 2009-10-05T18:19:16.153

312 How do I obtain a Query Execution Plan? 2011-09-09T09:37:21.923

309 SELECT INTO a table variable in T-SQL 2010-10-01T10:12:40.307

303 SQL MAX of multiple columns? 2008-09-16T10:27:02.400

303 Is it possible to specify condition in Count()? 2009-09-09T14:28:52.637

303 How to set a default value for an existing column 2011-07-22T14:42:41.497

301 What is the difference between SQL, PL-SQL and T-SQL? 2009-06-25T10:54:48.837

294 How do you change the datatype of a column in SQL Server? 2009-03-09T16:06:41.090

293 T-SQL Cast versus Convert 2009-04-01T21:05:48.217

291 What is the use of GO in SQL Server Management Studio & Transact SQL? 2010-02-19T20:12:42.963

287 List of all index & index columns in SQL Server DB 2009-04-19T18:38:24.623

284 What represents a double in sql server? 2009-07-30T20:34:03.327

283 Pad a string with leading zeros so it's 3 characters long in SQL Server 2008 2013-05-26T15:47:13.363

281 How to delete duplicate rows in sql server? 2013-08-22T20:51:14.023

280 What is the meaning of the prefix N in T-SQL statements? 2012-04-05T08:19:53.520

279 Query to list all stored procedures 2008-10-20T18:41:36.670

275 SQL Server: Difference between PARTITION BY and GROUP BY 2010-03-08T20:40:45.790

274 SET NOCOUNT ON usage 2009-09-27T14:52:29.403

271 Is there a combination of "LIKE" and "IN" in SQL? 2010-06-10T13:44:16.967

267 How do I generate random number for each row in a TSQL Select? 2009-06-25T17:17:35.350

266 Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql statement 2009-02-11T11:14:25.313

259 What is a stored procedure? 2009-01-19T22:33:24.520

257 What are the use cases for selecting CHAR over VARCHAR in SQL? 2008-09-12T18:15:28.097

257 How do I find a stored procedure containing <text>? 2011-02-22T14:34:57.740

251 SET versus SELECT when assigning variables? 2010-10-15T19:17:01.447

243 Create a date from day month and year with T-SQL 2008-11-05T22:12:00.487

242 Why do you create a View in a database? 2009-08-14T15:26:28.570

241 How do I move a table into a schema in T-SQL 2009-07-19T03:20:12.603

231 How to pass an array into a SQL Server stored procedure 2012-06-19T13:47:01.980

230 How to get a date in YYYY-MM-DD format from a TSQL datetime field? 2009-05-20T19:00:41.857

230 How can I select the first day of a month in SQL? 2009-10-05T15:30:06.483

228 How to set variable from a SQL query? 2010-10-20T04:02:50.053

227 Not equal <> != operator on NULL 2011-04-14T04:15:31.637

225 SELECT DISTINCT on one column 2009-06-08T18:12:40.670

225 How to DROP multiple columns with a single ALTER TABLE statement in SQL Server? 2011-06-14T15:32:34.270

220 How to check if a stored procedure exists before creating it 2010-01-15T14:13:34.353

219 How to check if a database exists in SQL Server? 2009-03-24T19:56:11.410

218 T-SQL: Deleting all duplicate rows but keeping one 2011-05-17T01:37:38.070

216 SQL query to select dates between two dates 2011-02-26T04:29:16.730

215 How do I create a foreign key in SQL Server? 2008-09-07T20:49:56.440

215 Hidden Features of SQL Server 2008-09-23T14:13:42.803

207 Need to list all triggers in SQL Server database with table name and table's schema 2010-11-29T16:21:06.363

206 SQL Server SELECT INTO @variable? 2011-01-28T01:22:23.757

205 Is there a way to loop through a table variable in TSQL without using a cursor? 2008-09-15T07:18:51.347

205 NOT IN clause and NULL values 2008-09-24T18:51:32.237

205 Check if a row exists, otherwise insert 2009-03-12T18:17:29.833

205 Check if a string contains a substring in SQL Server 2005, using a stored procedure 2010-03-24T07:14:44.743

203 Why use a READ UNCOMMITTED isolation level? 2010-03-18T15:30:06.663

200 Altering column size in SQL Server 2012-04-13T09:09:20.927

199 How do you return the column names of a table? 2009-03-01T20:30:58.383

196 How do I flush the PRINT buffer in TSQL? 2008-11-20T21:42:34.467

195 Most efficient T-SQL way to pad a varchar on the left to a certain length? 2008-09-23T15:46:39.147

195 How do I drop a foreign key constraint only if it exists in sql server? 2009-01-27T10:24:13.747

192 T-SQL CASE Clause: How to specify WHEN NULL 2010-07-13T13:32:04.043

190 Syntax of for-loop in SQL Server 2011-05-20T07:55:22.650

187 Convert Month Number to Month Name Function in SQL 2008-10-09T00:50:54.900