Python Forum
How read Table Structure from Database
Thread Rating:
  • 2 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How read Table Structure from Database
#2
you didn't say the DBMS name.
Most have a way to display the schema.
If sqlite3:
install sqlite3, on Linux Mint, use:
sudo apt install sqlite3
You will have to look up command for other systems, see: https://sqlite.org/download.html

from command line:
  • sqlite3 yourdbname
  • sqlite> .output 'schema.txt'
  • sqlite> .schema
  • sqlite> .quit
Reply


Messages In This Thread
RE: How read Table Structure from Database - by Larz60+ - Dec-05-2018, 11:00 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pymodbus read and save to database stewietopg 3 2,013 Mar-02-2023, 09:32 AM
Last Post: stewietopg
  Read JSON via API and write to SQL database TecInfo 5 2,460 Aug-09-2022, 04:44 PM
Last Post: TecInfo
  SaltStack: MySQL returner save less data into Database table columns xtc14 2 2,257 Jul-02-2021, 02:19 PM
Last Post: xtc14
  Yahoo_fin, Pandas: how to convert data table structure in csv file detlefschmitt 14 8,107 Feb-15-2021, 12:58 PM
Last Post: detlefschmitt
  Looping to read data in database CEC68 1 1,795 Sep-24-2020, 08:54 PM
Last Post: scidam
  Database structure (no code?) BlackmoreSteve620721 1 1,907 Apr-13-2020, 10:39 PM
Last Post: Larz60+
  MYSQL how to assign a table for each user in my username table database? YoshikageKira 1 2,901 Dec-26-2019, 05:57 AM
Last Post: buran
  Database table structure compare(Oracle) GKT 4 2,927 Oct-16-2019, 03:16 PM
Last Post: GKT
  Check table exists in Database ARV 0 2,028 Oct-03-2019, 02:37 PM
Last Post: ARV
  How do i read particular text from text file and update those values in MS SQL table ganeshsai2912 33 15,535 Nov-20-2018, 12:55 AM
Last Post: ganeshsai2912

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020