update 2 columns by doing inner 2-column query


Posted on 16th Feb 2014 07:03 pm by admin

Hi,
is something like this possible?

update contract_all set col1,col2 =
(SELECT col1,col2 FROM tab1 WHERE id = 141 and status='a')
where co_id=141;

Thanks

No comments posted yet

Your Answer:

Login to answer
277 Like 33 Dislike
Previous forums Next forums
Other forums

sql error
I have been looking at this code for 20mins and can't work out what I am doing wrong. There is somet

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

Greek characters in php
Hi,

I'm making a script and I m using for first time greek characters.
I started to write

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

phpMailer not working ..........
HI,
I was playing with the phpMailer script and tried to send a smiple mail using their test scri

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash