DDL of views can be obtained from information_schema.views. Below is the sql to get the view definition where schemaname is
Continue reading
DDL of views can be obtained from information_schema.views. Below is the sql to get the view definition where schemaname is
Continue readingRun the below query to list all the non-system views in a Redshift database. select table_schema, table_name from information_schema.views where
Continue readingBelow is the syntax to add a new column to an existing table in Redshift. alter table schemaname.tablename add columnname
Continue readingUse the below sql statement to view the recent 100 queries run by a user ordered by the most recent
Continue readingYou might encounter the below error while trying to modify a column in Redshift database from SQL Workbench. [Amazon](500310) Invalid
Continue readingYou can modify the distribution style of a table using below sql command: alter table tablename alter diststyle AUTO|ALL|EVEN|KEY DISTKEY
Continue readingYou can query the SVV_TABLE_INFO view to determine the distribution style of a table. select “database”, “schema”, “table”, “diststyle” from
Continue readingUse the Top function to query only the top 10 rows. Syntax is as below: Select top 10 * from
Continue readingRun the below command to deactivate the MFA device defined for an IAM user where username is the name of
Continue readingUse the below command to view all the information of an IAM role where ROLENAME is the name of the
Continue reading