INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

E-mail*
Handle

Password
Verify P'word
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Member Feedback

"...Congratulations on a brilliant idea and a great site..."

Geography

Where in the world do Tek-Tips members come from?

 update table set columnA=columnB, columnB=columnA

petersJazz (Programmer)
13 Nov 02 8:32
Is it possible to switch values in two columns with a sql statement like this:

update table set columnA = columnB, columnB = columnA;

Will it work correctly.
Helpful Member!MimerWizard (Programmer)
13 Nov 02 10:19
Let me give you a simple answer: Yes.

Each column is assigned a value that is independent on updates made on other columns (i.e. order of assignments in the update statement is irrelevant).

Start A New Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Promoting, selling, recruiting and student posting
are not allowed in the forums.
Posting Policies

LINK TO THIS FORUM!
(Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum)
TITLE: Mimer Information Technology: Mimer SQL Forum at Tek-Tips
URL: http://www.tek-tips.com/threadminder.cfm?pid=886
DESCRIPTION: Mimer Information Technology: Mimer SQL technical support forum and mutual help system for computer professionals. Selling and recruiting forbidden.