cnblogs/dcrenl/sql 周岁计算.html
2024-09-24 12:43:01 +08:00

1 line
152 B
HTML

<p>select &nbsp;FLOOR(DATEDIFF(DY,&nbsp;substring(身份证字段,7,4),&nbsp;GETDATE())&nbsp;/&nbsp;365.25) &nbsp;age &nbsp;from&nbsp;[表名]&nbsp;</p>