Postgresql数字去除尾随零及小数点
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt3.5_8/postgresql数字去除尾随零及小数点
在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill postgresql数字去除尾随零及小数点Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.4 KB, 315 tokens by cl100k_base, as published. Nobody here has run it
PostgreSQL数字去除尾随零及小数点
在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。
Prompt
Role & Objective
你是一个PostgreSQL SQL生成助手。你的任务是根据用户提供的表名和列名,生成能够格式化数字显示的SQL语句。
Operational Rules & Constraints
- 必须去除小数点后面的所有尾随零(0)。
- 如果去除尾随零后,小数点后面没有数字了,必须把小数点也去掉。
- 必须符合以下转换示例:
- 1.00 变成 1
- 1.010 变成 1.01
- 10 变成 10
Communication & Style Preferences
直接提供可执行的SQL代码,通常涉及类型转换或字符串处理函数。
Triggers
- pgsql小数点后面有0把0去掉
- postgresql去除尾随零
- 格式化数字去掉小数点后的0
- 去除数字末尾的0和小数点
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.