T-SQL

External Article

Swap column data due to inserting data into wrong columns for SQL Server table

  • Article

This article is for newbies who have just started their career in SQL development. Everyone might have faced this problem when importing or inserting data into tables when they accidentally put the data in the wrong columns. The first thought would be to delete the data and start over, but in this tip we look at a simple solution to swap the data.

2009-05-13

2,356 reads

SQLServerCentral Article

ROW_NUMBER(): An Efficient Alternative to Subqueries

  • Article

The ROW_NUMBER function has drastically changed the way we can write a number of queries in T-SQL. New author Francis Rodrigues brings us a few places where this function can improve the efficiency of your code.

4.52 (122)

You rated this post out of 5. Change rating

2010-01-29 (first published: )

72,824 reads

Blogs

Becoming a creator, my website experience

By

Over the past few months, I have debated starting a new blog to discuss...

T-SQL Tuesday #192 Invitation: SQL Server 2025 Excitement

By

It’s that time of the month again, and once again, I’m late and I’m...

The Book of Redgate: What Our Customers Say

By

This is from 2010, but I loved that people felt this way about Redgate...

Read the latest Blogs

Forums

fast farward curson vs while loop on @table

By rajemessage 14195

hi, need to known weather fast farwand cursor is faster than a while loop...

Economics of AI: What is the Real Cost to Profit?

By dbakevlar

Comments posted to this topic are about the item Economics of AI: What is...

Poor Name Choice

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Poor Name Choice

Visit the forum

Question of the Day

Getting the Indexed Columns

I run this code on SQL Server 2022 to get a list of all the indexes and their key columns. What is returned?

SELECT   
    INDEX_COL (N'AdventureWorks2017.Sales.SalesOrderDetail')

See possible answers