Searching for the SQL to retrieve table names for a SQLite database finds this SQL:
SELECT name FROM sqlite_master WHERE type="table"
The column names for MyTable can be found like this:
SELECT * FROM MyTable LIMIT 0
Provided that Ignore Header is false.
Accessing a Google spreadsheet is quite easy, but badly documented on the web. A good explanation is given by Taifun on his puravidaapps website: How to use a Google Drive Google Spreadsheet as Database
My solution here is a simplification that only looks at SELECT statements. Also, Google changes its API’s quite often, maybe this example does not use the latest, but I know that it worked in February 2017.
Below is a picture of the very simple spreadsheet I made. You can create a spreadsheet any way you like, creating a .csv file, using Microsoft Office, or Libre Office, or directly as a Google sheet. Make sure that your final sheet is a Google sheet, otherwise you cannot access it in the right way.
Blocks for the spreadsheet app:
A link to the .aia can be found here…
In this blog I will publish a number of App Inventor apps, with explanation. Some of the apps can be found here: http://squaringthecircles.com/ai2/
I will move these eventually.