mysql - SQL copy row to another row in same table -


i need copy values row1 row2 records contains "no tiltle"

i tried:

update `table` set name=@tmp:=name,name=meta_title,meta_title=@tmp name='no title'; update `bb_product_description` set name = meta_title meta_title="no  title" 

but copy "no title all"

please me

you use standard insert ... select so:

insert table select * table meta_title='no title'; 

or more selective (no pun intended)...

insert table (name, col2, col3...) select meta_title, col2, col3... table meta_title = 'no title' 

which, if i'm understanding question correctly, should want go.

or, fix update statement above:

update `bb_product_description` set `name` = `meta_title` `meta_title` = 'no title' 

note removed space in 'no title' , changed double- single-quote because safety.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -