我有一些选择语句,其中之一:
SELECT c_c.id,
c_c.full_name,
c_c.telephone,
c_c.fax,
cast(c_c.adress_juridical as varchar(256)) as adress_juridical,
cast(c_c.adress_naturale as varchar(256)) as adress_naturale,
c_c.director,
c_c.name,
c_c.b_id,
c_c.dt_start,
c_c.dt_end
FROM c_counteragents c_c
WHERE c_c.id = -1 AND c_c.b_id = -1;
如何获取select语句的名称?
此select的列名称必须不包含allias c_c
。
它不是那么容易,只是拿一个表名并查找表的列名。我不知道表的名称,因为我从某个表中检索此SELECT
语句,并将其存储为文本。