On Sunday, August 17, 2003, 10:01:51 AM, Peter Sergeant wrote:

PS> It's at times like this I realise my SQL skills only cover the basics...

PS> I have two tables, 'user' and 'users_names'. I'm looking to deprecate
PS> 'users_names', so I've altered 'user' to now contain a 'user_realname'
PS> column. Both tables have a column 'user_id', which correspond to each
PS> other. I'd like to take the data from 'users_names.name' and put it into
PS> 'user.user_realname' where the 'user_id' column match. I just can't seem
PS> to find the SQL to make MySQL do this.

is it not simply:

UPDATE user
   SET user.user_realname = user_names.name
 WHERE user.user_id = user_names.user_id

?

-- 
Iain | PGP mail preferred: pubkey @ www.deepsea.f9.co.uk/misc/iain.asc
($=,$,)=split m$"13/$,qq;13"13/tl\.rnh  r   HITtahkPctacriAneeeusaoJ;;
for(@[EMAIL PROTECTED] m,,,$,){$..=$$[$=];$$=$=[$=];[EMAIL PROTECTED];[EMAIL PROTECTED]
]eq$$&&$=>=$?;$==$?;for(@$)[EMAIL PROTECTED] eq$_;;last if!$@;$=++}}print$..$/



Reply via email to