mysql Operating Summary

A. Set the original default value of the database field

1. Delete the old field defaults

Table sr_main_ww main_bz_sam02 column ALTER ALTER default drop;
2 .. override the default values of the original field
alter table sr_main_ww alter column main_bz_sam02 set default 0;

two.

// application, without making more than one day to check
the SELECT
f_lookup (1137, mdjlx) AS mdjlx, COUNT (. 1) AS nCount
the FROM
sr_main
the WHERE
sys_scbj = 0
the AND sys_spzt = 99
the AND sys_spdj = 2
the AND wthdbj = '2'
and TIMESTAMPDIFF (DAY, sys_shrq, SYSDATE ())>. 1
the GROUP BY mdjlx;

 

Guess you like

Origin www.cnblogs.com/tongcc/p/11300118.html