Mark Williams 14 Posted August 6, 2019 Trying to analyse the structure of a table using TFDMetaDataQuery with MetaDataKind set to mkTableFields. This returns just about everything I need apart from (as far I can see) a field's default value. I can see it returns TFDDataAttributes and that this includes an attribute caDefault which advises if a field has a default value, but I can see now way of ascertaining what the default value is. The metadata structure can be found at: http://docwiki.embarcadero.com/RADStudio/Rio/en/Metadata_Structure_(FireDAC) 1 Share this post Link to post
Lars Fosdal 1792 Posted August 7, 2019 Which database? For SQL Server, there is this: https://stackoverflow.com/questions/3817885/sql-server-find-out-default-value-of-a-column-with-a-query Share this post Link to post
Mark Williams 14 Posted August 7, 2019 4 hours ago, Lars Fosdal said: Which database? For SQL Server, there is this: https://stackoverflow.com/questions/3817885/sql-server-find-out-default-value-of-a-column-with-a-query Thanks Lars. There is a query for PostgreSQL which will retrieve this info, but I was hoping to do it all with the MetaDataQuery. Share this post Link to post