Does anyone have a SQL query to retrieve field names with datatype and size from all tables within an access database?
I was hoping to use something like the below code... But, I want the SQL code to know the current database and tables without me having to specify them
In the following example, the code can be just cut and paste from one database to another without having to change anything, and this is what i would like to achieve with the new SQL code to query field names with data types and size.
Your help is always appreciated
Kind regards
Tor Fey
I was hoping to use something like the below code... But, I want the SQL code to know the current database and tables without me having to specify them
SQL:
SELECT column_name as 'Column Name', data_type as 'Data Type',
character_maximum_length as 'Max Length'
FROM information_schema.columns
WHERE table_name = 'tblUsers'
In the following example, the code can be just cut and paste from one database to another without having to change anything, and this is what i would like to achieve with the new SQL code to query field names with data types and size.
SQL:
SELECT MSysObjects.name, MSysObjects.DateCreate, MSysObjects.DateUpdate
FROM MSysObjects
WHERE (((MSysObjects.name) Not Like '~*' And (MSysObjects.name) Not Like 'MSys*') AND ((MSysObjects.type) In (1,4,6)))
ORDER BY MSysObjects.DateUpdate DESC;
Your help is always appreciated
Kind regards
Tor Fey