Amazon Redshift Daily: SELECT CURRENT_AWS_ACCOUNT; SELECT CURRENT_DATABASE(); SELECT CURRENT_NAMESPACE(); SELECT CURRENT_SCHEMA(); SELECT CURRENT_USER_ID(); SELECT CURRENT_USER; -- Metadata select distinct(nspname) from pg_catalog.pg_namespace where nspname not like 'pg_temp%'; -- Describe Table select * from information_schema.columns where table_name='columns'; select column_name, data_type, character_maximum_length from information_schema.columns where table_name='columns'; -- Create Read-only Group Create group ro_group; -- Create User Crate user ro_user with password <password>; -- Add user to Read-only Group alter group ro_group ADD user ro_user; -- Grant Usage permission to Read-Only Group to specific schema grant usage on schema "ro_schema" to group ro_group; -- Grant select permisson to read-only group to specific schema grant select on all tables in schema "ro_schema" to group "ro_group"; -- Alter default privileges ...
Welcome to explore technology about Kubernetes, MySQL, Machine Learning | Deep Learning - Shrenik Parekh