Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] List all tables command #2

Closed
emisjerry opened this issue May 29, 2024 · 4 comments
Closed

[FR] List all tables command #2

emisjerry opened this issue May 29, 2024 · 4 comments
Assignees

Comments

@emisjerry
Copy link

Could you add a command to list all tables in the database?
For example, we can use ".tables" in sqlite3.exe to list all the tables.

For now, i use the following SQL statements to list tables:

  • SQL Server: select name from sysobjects where xtype='U';
  • SQlite3: SELECT name FROM sqlite_master WHERE type='table';

It would be nice if the command to display the column structure was also available. Such as Oracle's "describe" command.

@hymkor hymkor self-assigned this May 29, 2024
@hymkor
Copy link
Owner

hymkor commented May 29, 2024

DESC or \d command is available for listing them.

  • DESC or \d without aguments shows the list of tables.
  • DESC tablename or \d tablename shows the specification of the table.

image

Since I am used to Oracle, the specifications are similar to Oracle's SQL*Plus. If you have any suggestions for improvement about DESC command, Would you post them in this issue ?

@emisjerry
Copy link
Author

Thanks for your reply.

Is there any 'secret' command other than ‘desc’, which is not mentioned in the README?
How about the ".tables" command?

@hymkor
Copy link
Owner

hymkor commented May 29, 2024

I thought I had written it, but I didn't. (I wasn't trying to hide it, I just forgot)

Thank you for pointing that out. I would confirm and update README.

Is DESC ; without arguments equivalent to .tables ?

@emisjerry
Copy link
Author

DESC ; works.

@hymkor hymkor closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants