Learn more about SQL Server tools



solving sql server problems for millions of dbas and developers since 2006 join MSSQLTips for free SQL Server tips
































   Got a SQL tip?
            We want to know!


T-SQL Tips

All Tips
  PowerShell Regular Expression (RegEx) Video Examples for SQL Server
  Silent Truncation of SQL Server Data Inserts
Backward Compatibility
  Make your SQL Server database changes backward compatible when adding a new column
  Make your SQL Server database changes backward compatible when changing a relationship
  Make your SQL Server database changes backward compatible when dropping a column
  Make your SQL Server database changes backward compatible when renaming an entity
Calculations
  Avoiding erroneous results when using T-SQL Trigonometric Functions in SQL Server 2012
  Calculating and verifying financial values in SQL Server
  Calculating Mathematical Values in SQL Server
  Getting a SQL Server RowCount Without doing a Table Scan
  Script to calculate the Median value for SQL Server data
Computed Columns
  Change All Computed Columns to Persisted in SQL Server
  Getting creative with Computed Columns in SQL Server
  What Effect Does Persisting a Computed Column Have in SQL Server?
  What Happens When a Computed Column is Persisted in SQL Server?
Configuration
  Determining SET Options for a Current Session in SQL Server
  Limit amount of data returned with the SQL Server TEXTSIZE command
Data Tier
  Introduction to Data Tier Applications in SQL Server 2008 R2
Data Types
  Overview of WITH RESULT SETS Feature of SQL Server 2012
  SQL Server Bitwise operators store multiple values in one column
Delete
  Deleting Data in SQL Server with TRUNCATE vs DELETE commands
Duplicate Data
  Delete duplicate rows with no primary key on a SQL Server table
Merge
  Comparing performance for the MERGE statement to SELECT, INSERT, UPDATE or DELETE
  SQL Server 2008 MERGE More than UPSERT
  Use Caution with SQL Server's MERGE Statement
  Using MERGE in SQL Server to insert, update and delete at the same time
  Using the SQL Server MERGE Statement to Process Type 2 Slowly Changing Dimensions
OUTPUT
  SQL Server 2008 consume output directly from the OUTPUT command
  Using INSERT OUTPUT in a SQL Server Transaction
Pivot
  Script to create dynamic PIVOT queries in SQL Server
  Use SQL Server's UNPIVOT operator to dynamically normalize output
  Use SQL Server's UNPIVOT operator to help normalize output
Plan Cache
  Keeping data available in the SQL Server data cache with PINTABLE
Random Data
  Generating Random Numbers in SQL Server Without Collisions
  SQL Server stored procedure to generate random passwords
Result Set
  Rolling up multiple rows into a single row and column for SQL Server data
  SQL Server 2008 Group By Sets
Security
  Preventing TSQL code from running on a Production SQL Server
System
  Auto Rename SQL Server Tables and Their References with PowerShell
  Dropping multiple SQL Server objects with a single DROP statement
  Renaming SQL Server database objects and changing object owners
  SQL Server Four part naming
  SQL Server sp_ prefix when and when not to use it
Temp Tables
  Create SQL Server temporary tables with the correct collation
  Differences between SQL Server temporary tables and table variables
  SQL Server Temp Table vs Table Variable Performance Testing
Troubleshooting
  Problem using DISTINCT in case insensitive SQL Server databases
  SQL Server work around for Msg 2714 There is already an object named #temp in the database
Tutorials
  New SQL Server Database Development Tutorial
  SQL Server Insert Tutorial
  SQL Server SELECT Tutorial
Update
  Swap SQL Server column data due to inserting data into wrong columns
Variables
  Nullability settings with select into and variables
  SQL Server 2008 Inline variable initialization and Compound assignment
  When to use SET vs SELECT when assigning values to variables in SQL Server
Webcast
  Free Webcast - Building blocks for managing your SQL Server code

 
Sponsor Information







Copyright (c) 2006-2014 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | about
authors | contribute | feedback | giveaways | free t-shirt | user groups | community | events | first timer?
Some names and products listed are the registered trademarks of their respective owners.