如下图:
这个表a中,查找出id列中的第五个字符,并把这个字符的值返回到VALUE列
这个sql语句该怎么写呀?
还有就是返回到VALUE的值是id列中的第四和第五位字符,又该怎么写呢?如下
求助 谢谢了
5 个解决方案
#1
select id,name,substring(id,5,1) as value from tb
select id,name,substring(id,4,1) as value from tb
#2
1.select id,name,substring(id,5,1) as value from tb
2.select id,name,substring(id,4,2) as value from tb
#3
select id,name,substring(id,5,1) as value from tb
select id,name,substring(id,4,2) as value from tb
select id,name,substring(id,4,2) as value from tb
#4
select id,name,substring(id,5,1) as [value] from tb
select id,name,substring(id,4,2) as [value] from tb
#5
看书去
#1
select id,name,substring(id,5,1) as value from tb
select id,name,substring(id,4,1) as value from tb
#2
1.select id,name,substring(id,5,1) as value from tb
2.select id,name,substring(id,4,2) as value from tb
#3
select id,name,substring(id,5,1) as value from tb
select id,name,substring(id,4,2) as value from tb
select id,name,substring(id,4,2) as value from tb
#4
select id,name,substring(id,5,1) as [value] from tb
select id,name,substring(id,4,2) as [value] from tb
#5
看书去