xxx表中id字段是int型,有10条记录(id=11~20),执行select substring(str(id),1,1) from xxx 之后为何返回10行空白?
解决方案 »
- SQL 查询怎么将行变成列
- INSERT语句的简单问题!
- Excel表导入数据库不插入重复数据,在线等....
- 请问sql2005会和硬件或系统有冲突吗?
- 为什么会出现“[color=#FF0000]消息 116,级别 16,状态 1,第 11 行 当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达
- 请教个数据库关联查询问题,是有关关联表的行与列相互查询,想了几天没有好的方法
- 在线等待!!!
- sql备份还原问题(在线等)
- 怎样得到SQL SERVER下有哪些数据库、每个数据库下面有哪些表...???!!!!
- 怎样将补缺少的行数据
- BCP导出数据到EXCEL文件时,如何连字段名一起导出?
- 求行中的最大值sql语句,,,,
insert @t select 11
insert @t select 12
insert @t select 13
insert @t select 14
insert @t select 15
insert @t select 16
insert @t select 17
insert @t select 18
insert @t select 19
insert @t select 20
select substring(cast(id as varchar(2)),1,1) from @t
insert into t(id)
select 11 union
select 12 union
select 13 union
select 14 union
select 15 union
select 16 union
select 17 union
select 18 union
select 19 union
select 20 select substring(ltrim(str(id)),1,1) from t drop table t
select substring(str(id),1,9) from xxx
str() 总长度默认值为 10