Nukool Asked: 2020-12-26 00:03:10 +0800 CST2020-12-26 00:03:10 +0800 CST 2020-12-26 00:03:10 +0800 CST SQL 在现有数据前添加零以满足字段长度 772 如何在 NationalityCode 字段的现有数据前添加零以使长度为 5 ? firebird 1 个回答 Voted Best Answer Lennart - Slava Ukraini 2020-12-26T05:13:45+08:002020-12-26T05:13:45+08:00 SELECT LPAD(nationalitycode, 5, '0') FROM... 见https://firebirdsql.org/refdocs/langrefupd21-intfunc-lpad.html 如果要更新国籍代码: UPDATE ... SET nationalitycode = LPAD(nationalitycode, 5, '0') WHERE ...
见https://firebirdsql.org/refdocs/langrefupd21-intfunc-lpad.html
如果要更新国籍代码: