我有一个名为的表datas
,我正在执行这样的查询:
SELECT linkurl AS DOWNLOADURL,
lastrevlevel AS VERSION,
code AS DESCRIPTION,
created AS RELEASEDATE,
name AS TYPE
FROM datas
WHERE id IN (SELECT child_id
FROM datas _datas
WHERE parent_id = (SELECT Max(id)
FROM datas
WHERE code = 'AN4307SW'))
它返回如下结果:
DOWNLOADURL VERSION DESCRIPTION RELEASEDATE TYPE
/artifacts/download.txt 2.0 images 25/6/12 download.txt
在Type
列中,我正在获取文件的名称。我需要获取Type
列中文件名的文件扩展名。我怎样才能做到这一点?
例子:
TYPE
.txt
.pdf
.xls