一些SQL语句记录

update point_main as tc right join (
	select ta.SN,tb.*, concat('M5',lpad(ta.SN*10,3,'0')) as C1, concat('M1',lpad(ta.SN*10,3,'0')) as C2 
	from ( SELECT  row_number() over (order by id) as SN,id from point_main  WHERE `point_ip` = '127.0.0.1:10502'	) as ta 
	left join point_main as tb on ta.id = tb.id
 ) as td on td.id = tc.id
 set tc.point_pos = td.C1,	tc.point_switch=td.C2, tc.point_title  = concat('南面',td.C1)

 

Leave a Reply

Your email address will not be published. Required fields are marked *