# 计税
每月生成工资单时,Joe 需要根据 employee 表的 salary 字段,计算出每个员工的所得税和税后工资,
因此他决定写一个 individual_income_tax 函数,根据睡前工资计算税额。不考虑实现逻辑,这个函数的声明应该是:
点击进入[MySQL实战练习环境](https://mydev.csdn.net/product/pod/new?image=cimg-centos7-skilltreemysql&connect=auto&create=auto&utm_source=skill){target="_blank"}。
* `show databases;` 列出所有数据库
* `show tables;` 列出所有表
## 答案
```sql
create function individual_income_tax(salary decimal(12, 4)) returns decimal(12, 4)
deterministic
begin
-- ...
end;
```
## 选项
### A
```sql
create store function individual_income_tax(salary decimal(12, 4)) returns decimal(12, 4)
deterministic
begin
-- ...
end;
```
### B
```sql
create function individual_income_tax(salary decimal(12, 4))
deterministic
begin
-- ...
end;
```
### C
```sql
create function decimal(12, 4) individual_income_tax(salary decimal(12, 4))
begin
-- ...
end;
```