What is the difference between SET and SELECT?

By Bill Graziano on 15 February 2004 | Tags: SELECT


Narayana Vyas Kondreddi submitted "Both SET and SELECT can be used to assign values to variables. But when to or when not to use SET or SELECT? Or does it matter? This articles shows you how SET and SELECT are different in various scenarios, along with examples. You will also find a test script that you can run, to identify the performance differences between SET and SELECT"

Link: What is the difference between SET and SELECT?


Related Articles

Joining to the Next Sequential Row (2 April 2008)

Writing Outer Joins in T-SQL (11 February 2008)

How to Use GROUP BY with Distinct Aggregates and Derived tables (31 July 2007)

How to Use GROUP BY in SQL Server (30 July 2007)

SQL Server 2005: Using OVER() with Aggregate Functions (21 May 2007)

Server Side Paging using SQL Server 2005 (4 January 2007)

Using XQuery, New Large DataTypes, and More (9 May 2006)

Counting Parents and Children with Count Distinct (10 January 2006)

Other Recent Forum Posts

SQL Server detected a logical consistency-based I/O error: torn page (expected signature: 0xaaaaaaaa; actual signature: 0xfffffffe). It occurred during a read of page (1:908) in database ID 99 at offset (68m)

Case stmt in SSIS (19h)

Upgrading from MSSQL 2016 to 2017 (1d)

Why does CASE WHEN NULL IN (SELECT A FROM B) THEN 'Y' ELSE '' AS [NULL] does not work? (1d)

Tensorflow package installation on SQL 2019 ML Services (1d)

How can I reference the table (T1 JOIN T2 ON A=B JOIN T3 ON C=D)? (1d)

Is there an easy way to populate a column with an INDEX/MATCH statement? (2d)

Is joining table completely deceiving? (2d)

- Advertisement -