3

How do I get all the field names in a Table in Microsoft Access using JET SQL?

Thanks all

3
  • This is not possible in pure SQL. Commented Feb 9, 2010 at 2:18
  • Are you not able to use VBA for this purpose? Commented Feb 9, 2010 at 5:31
  • Uh, VBA != SQL. Of course, you can use VBA, or C# or VB.NET or vbScript or any language you want as long as it can connect to a driver that can read your Jet database. Commented Feb 9, 2010 at 22:01

2 Answers 2

1

I was making using of the ODBC extension in PHP and it has a function to do this!

In case anyone needs this in the future its, odbc_tables!

Sign up to request clarification or add additional context in comments.

2 Comments

I do need it, but for Perl, and its DBD::ODBC doesn't appear to support an equivalent.
For python if you are using pyodbc check out this thread: stackoverflow.com/a/16328498.
0

You can write a SQL query like this:

SELECT * FROM [sometablename] WHERE 1<>1 or
SELECT * FROM [sometablename] WHERE 1=2 

This will result no row data but with field names.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.