sql 不够七位数 在左侧自动补零,怎么实现?
2010-08-27 08:05
218 查看
来自:http://topic.csdn.net/u/20100826/08/c6ab7727-85d8-4052-88da-dbd158b2d51f.html?62668
回答者:
ws_hgo
(蓝天白云--(全面提升!!))
等 级:
回答者:
ws_hgo
(蓝天白云--(全面提升!!))
等 级:
if object_id('[TB]') is not null drop table [TB] create table [TB]([id] int) insert [TB] select 49999 union all select 4565 union all select 12362 union all select 1111111 union all select 232132 union all select 2222 GO select right('000000'+ltrim([id]),7) id from [TB] id -------------- 0049999 0004565 0012362 1111111 0232132 0002222 (6 行受影响)
相关文章推荐
- sql 不够七位数 在左侧自动补零 ,并循环插入N条记录
- sql中左侧不够自动补0的写法,优!
- [Bartender]Bartender条形码制作软件如何实现左侧自动补零
- 如何在C#中用程序执行指定的SQL脚本文件,实现自动安装创建数据库
- ios中纯手写代码怎么实现控件的自动布局(约束)
- SQL 数据库的自动备份(Procedures实现)
- SQL Server Express 自动安装实现
- Sql 实现自动添加行数标记
- 用java的反射实现将ResultSet自动转化成对象,自动产生sql语句
- eclipse怎么设置选中文件编辑的文件时,自动关联选择左侧树里的文件?
- SQL怎么实现SLEEP功能(等待时间)
- [python]web框架中的代码自动重载怎么实现
- 特殊安装的实现--IIS自动配置与卸载、SQL自动导入
- 实现SQL intellisense,sql代码自动填充----转载
- JAVA自定义注解实现SQL语句自动生成DEMO(2)
- 设置PL/SQL实现自动补全
- SQL定时自动备份,并将备份文件加密压缩并自动下载的实现
- 转:SQL定时自动备份,并将备份文件加密压缩并自动下载的实现
- 动易多屏优化怎么实现网站自动识别用户访问设备
- Mybatis使用拦截器自动分页实现/使用反射替换sql代码分页