Show tables, describe tables equivalent in redshift

后端 未结 8 787
说谎
说谎 2021-01-30 03:17

I\'m new to aws, can anyone tell me what are redshifts\' equivalents to mysql commands?

show tables -- redshift command
describe table_name -- redshift command
<         


        
8条回答
  •  一整个雨季
    2021-01-30 03:40

    I had to select from the information schema to get details of my tables and columns; in case it helps anyone:

    SELECT * FROM information_schema.tables
    WHERE table_schema = 'myschema'; 
    
    SELECT * FROM information_schema.columns
    WHERE table_schema = 'myschema' AND table_name = 'mytable'; 
    

提交回复
热议问题