sqlsunday.com

T-SQL tips and tricks, best practices and query plans from the field.

Skip to content
  • sqlsunday.com
  • Structured Concepts
    • Master data tool
    • Send passwords
  • Slack app
  • Presentations
  • Downloads
  • Checklists
    • Installing SQL Server 2014
    • Installing SQL Server 2016
    • Installing SQL Server 2017
    • Installing SQL Server 2019
    • Links and utilities
Search

select

Inline variable assignment in UPDATE statements

2014-06-292014-06-22 / Daniel Hutmacher / 6 Comments

Ok, here’s a brain-twister. Not only can you assign values to a column in an UPDATE statement using variables, but you can assign values to variables as well. It’s really not as complicated as it may sound, but there are a few trapdoors to avoid.

Continue reading →

Search

Categories

  • By difficulty (182)
    • Advanced (39)
    • Basics (53)
    • Intermediate (92)
  • CLR (1)
  • Code review (1)
  • Off-topic (14)
  • Rant (6)
  • Scripts (19)
  • Series (29)
    • Efficient data (8)
    • Introduction to T-SQL (1)
    • Slowly changing dimensions (5)
    • SQL Server security (15)
  • SQL Server concepts (75)
  • T-SQL (134)
  • Tips (53)
  • Uncategorized (1)
  • Videos (2)
Daniel Hutmacher, Structured Concepts AB

SQL SERVER HELP YOU CAN DEPEND ON.

Need SQL Server help?

At Structured Concepts, we specialize in SQL Server development and performance tuning, as well as technical training for users and developers.

Visit our homepage at strd.co.

Create a website or blog at WordPress.com