Snowflake DB Admin scripts:
Snowflake DB admin commands/scripts
***************************************
To know the current_user
SELECT CURRENT_USER();
To know the current_Role
SELECT CURRENT_ROLE();
To know the current_DB
SELECT CURRENT_DATABASE();
To use another DB
use DWDB1
To list down the DB's
SHOW DATABASES;
select * from information_schema.databases;
To list down the tables,views,users
show tables;
SHOW WAREHOUSES;
SHOW USERS;
show views;
show functions;
show procedures;
SHOW SCHEMAs;
show roles;
No comments:
Post a Comment