select startdateofemp,mms,format(floor(mms/12),0) as years , alias,surname from ( SELECT *, (year(curdate())*12+month(curdate()))-(year(startdateofemp)*12+month(startdateofemp)) as mms from employee where status='A') x;
name | byte | bit | cq_whhpl |
---|---|---|---|
tinyint | 1 | 8 | 2 |
smallint | 2 | 16 | 4 |
medium | 3 | 24 | 6 |
int | 4 | 32 | 9 |
bigint | 8 | 64 | 20 |
沒有留言:
張貼留言