Compare Schema classes to database

Doug Easterbrook doug at artsman.com
Thu Sep 15 16:57:31 UTC 2022


hi andrew:

I’ve done things like it in postgres….     Postgres has commands to read the information schemas and database tables.  Other databases have simmilar commands

in the Mysql documentation https://dev.mysql.com/doc/refman/8.0/en/information-schema.html

there is a strong implications that you can do the same things in mysql.

for example, there is a COLUMNS table in mysql .. that you should be able to get the columns of a table
(see page: https://dev.mysql.com/doc/refman/8.0/en/information-schema-columns-table.html)

at the bottom of the page is an example select statement.


SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE table_name = 'tbl_name'
  [AND table_schema = 'db_name']
  [AND column_name LIKE 'wild']

SHOW COLUMNS
  FROM tbl_name
  [FROM db_name]
  [LIKE 'wild']



Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On Sep 15, 2022, at 9:39 AM, Andrew Stolarz <stolarz at gmail.com> wrote:
> 
> Hi All,
> 
> Is there an easy way to compare my Schema classes in Omnis to my MySQL
> schema?
> 
> Anyone else do something like this?
> 
> 
> Andrew
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list