numbers.md 410 字节
Newer Older
M
number  
Mars Liu 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
# 数值的隐式类型转换

Joe 需要使用下列表做一项数值计算

```mysql
create table data(
    id int primary key auto_increment,
    x int,
    y int
);
```

计算查询为:

```mysql
select id, (x^2 + y^2)/2 as result from points;
```

得到的结果集中,result 列的类型应该是:

## 答案

decimal

## 选项

### A

float

### B

double

### C

int

### D

long

### E

byte