Table Definition in MODE

How to see table structure/definition in MODE?

 

Does it follow postgresql ?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Awadhesh Kumar - thanks for writing in.

    While writing queries in Mode you can use the Schema Browser to view the schemas, tables, and columns in your database. The dialect of SQL that you will need to use to query those tables will depend on which kind of database you have connected to Mode. If you connect a PostgreSQL database, than that's the dialect you'll use.

    Hope that helps - happy querying!

    Reply Like
  • Thanks Jonathan Krangel for replying but I just wanted the query.

     

    For example in ORACLE we have DESC TABLE_NAME like wise in mode how we will see it.

    Reply Like
    • Jonathan Krangeladmin
    • Director - Head of Customer Success @ Mode
    • Jonathan_Krangel
    • 6 mths ago
    • Answer
    • Reported - view

    Thanks for clarifying Awadhesh Kumar . PostgreSQL does not have a DESC command like Oracle, but you can use the built-in information_schema tables to accomplish the same goal. The following statement will return information about a given schema and table:

    SELECT * FROM information_schema.COLUMNS WHERE
    TABLE_NAME = '[TABLE_NAME]' AND TABLE_SCHEMA = '[SCHEMA_NAME]';

    For example, you can run the following against the Mode Public Warehouse to see the structure of a the table demo.orders:

    SELECT * FROM information_schema.COLUMNS WHERE
    TABLE_NAME = 'orders' AND TABLE_SCHEMA = 'demo';
    

    Hope that helps - happy querying!

    Reply Like
  • Thanks a lot Jonathan Krangel  for help.😊

    Reply Like
Like Follow
  • Status Answered
  • 6 mths agoLast active
  • 4Replies
  • 234Views
  • 2 Following

Create A New Discussion

Share your thoughts