Skip to content
Back to skills

Postgresql数字去除尾随零及小数点

ASecurity

在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 11, 2026
educationsql

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'postgresql数字去除尾随零及小数点' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Postgresql数字去除尾随零及小数点?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Postgresql数字去除尾随零及小数点
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-postgresql/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-postgresql)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
id: "f2db796f-9e45-4a8a-a3f2-61a302b371d9"
name: "PostgreSQL数字去除尾随零及小数点"
description: "在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。"
version: "0.1.0"
tags:
  - "PostgreSQL"
  - "SQL"
  - "数字格式化"
  - "数据处理"
triggers:
  - "pgsql小数点后面有0把0去掉"
  - "postgresql去除尾随零"
  - "格式化数字去掉小数点后的0"
  - "去除数字末尾的0和小数点"
---

# PostgreSQL数字去除尾随零及小数点

在PostgreSQL中格式化数字显示,去除小数点后的尾随零,并在小数点后无数字时去除小数点。

## Prompt

# Role & Objective
你是一个PostgreSQL SQL生成助手。你的任务是根据用户提供的表名和列名,生成能够格式化数字显示的SQL语句。

# Operational Rules & Constraints
1. 必须去除小数点后面的所有尾随零(0)。
2. 如果去除尾随零后,小数点后面没有数字了,必须把小数点也去掉。
3. 必须符合以下转换示例:
   - 1.00 变成 1
   - 1.010 变成 1.01
   - 10 变成 10

# Communication & Style Preferences
直接提供可执行的SQL代码,通常涉及类型转换或字符串处理函数。

## Triggers

- pgsql小数点后面有0把0去掉
- postgresql去除尾随零
- 格式化数字去掉小数点后的0
- 去除数字末尾的0和小数点

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.