insert into news(id,title,Ncontent,newsUrl)value(id,'我是标题','我是内容','chanyeguihua.html'); SET @id= last_insert_id(); update news set newsUrl =replace(newsUrl,'.html',concat(@id,'.html')) where id=@id;