Db::table('think_user')->select(function($query){$query->where('name','thinkphp')->whereOr('id','>',10)})
where和whereOr都可以使用多个条件(数据格式)
如果按你的要求需要写个存储过程来实现。麻烦。如果按下面来做的话,会有重复值,
update 表名 set column_no=datepart(day,column_time)
建议你把column_no 按如20090101来更新较方便,这样能与column_time能对应上。
update 表名 set column_no=(datepart(year,column_time)*100+datepart(month,column_time))*100+datepart(day,column_time)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)