Registriert seit: 29. Nov 2010
3.072 Beiträge
Delphi 2010 Enterprise
|
AW: Anzahl der Felder einer Tabelle per SQL auslesen
1. Feb 2017, 10:55
Versuch mal:
Code:
-- Namen
select f.rdb$relation_name, f.rdb$field_name
from rdb$relation_fields f
join rdb$relations r
on f.rdb$relation_name = r.rdb$relation_name
and r.rdb$view_blr is null
and (r.rdb$system_flag is null or r.rdb$system_flag = 0)
order by 1, f.rdb$field_position;
-- Anzahl
select f.rdb$relation_name, count(*)
from rdb$relation_fields f
join rdb$relations r
on f.rdb$relation_name = r.rdb$relation_name
and r.rdb$view_blr is null
and (r.rdb$system_flag is null or r.rdb$system_flag = 0)
group by f.rdb$relation_name
order by 1, 2
Gruß, Jo
|
|
Zitat
|