Hi, Visu.
We can get table information in MS SQL Server by means using sp_help.I
want to know the equivalent sql command for ms-access.
SQL Server has system tables that contain information on each table's
structure. Access does not. Therefore, there are no system tables to query
with Jet SQL. Use the ADO and ADOX libraries, or the DAO library in VBA
instead. Use Tables and Indexes if using ADOX. Use TableDefs, Fields, and
the PrimaryKey Index if using DAO. One must use ADO's OpenSchema function
of the Connection object to retrieve the list of constraints, not DAO,
because it's not available in DAO.
If you just want the column names of a table, that's easy enough with SQL.
Try the following syntax to export the column names to a text file:
SELECT * INTO [TEXT;HDR=Yes;DATABASE=F:\Work\Test\].MyTable.txt
FROM MyTable
WHERE (1 = 0);
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs:
www.DataDevilDog.BlogSpot.com,
www.DatabaseTips.BlogSpot.com http://www.Access.QBuilt.com/html/ex...ributors2.html for contact
info.
"visu" <k.******@gmail.comwrote in message
news:11*********************@e65g2000hsc.googlegro ups.com...
Hi ,
can anyone tell me how to get the complete table schema including
constraints, primary key ..etc.
through sql Query in Ms access.
We can get table information in MS SQL Server by means using sp_help.I
want to know the equivalent sql command for ms-access.
thanks in advance
Regards
visu