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

Firefox displaying PHP source code??
Currently testing a site thats almost built, am going to be including php on a sidebar on all pages

'210010106140040100' == '210010106140040101'
Debugging this simple line of a PHP script

Code: if($a == $b){ }
I've found that with val

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listing

Fatal error: Call to a member function fetchrow() on a non-object in C:xamppht
okay i have this query and everytime i add `item_id`=? to it... it gives me the error in the title..

Strange php code found on my website
I got hacked and the following code was placed within my files:

Code: [Select]<?
/*

do while conditions
i want to display 6 images in a 2x3 table
now what would be the correct logic to
count that th

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

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