Search
 
SCRIPT & CODE EXAMPLE
 

SQL

command to give readonly access to a postgres sql user

sudo -u postgres psql
CREATE USER username WITH PASSWORD 'your_password';
GRANT CONNECT ON DATABASE database_name TO username;
GRANT USAGE ON SCHEMA schema_name TO username;
GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO username;
ALTER DEFAULT PRIVILEGES IN SCHEMA schema_name
GRANT SELECT ON TABLES TO username;
Comment

PREVIOUS NEXT
Code Example
Sql :: what is having clause in sql 
Sql :: how to pass dynamic column name in sql query 
Sql :: count occurrences sql 
Sql :: psql generate id in existing database 
Sql :: mysql default value 
Sql :: declare value in sql 
Sql :: reset keys in sql 
Sql :: mysql community server 
Sql :: psql select * from table 
Sql :: format the money fied with comma in international system using sql 
Sql :: How to import CSV file into a MySQL table 
Sql :: sql online 
Sql :: select database in mysql 
Sql :: if else in mysql stored procedure 
Sql :: select all tables linked server sql 
Sql :: oracle list days between two dates 
Sql :: Write an SQL query to fetch worker names with salaries = 50000 and <= 100000. 
Sql :: postgresql backup and restore globals and data 
Sql :: sql unique constraint 
Sql :: mysql composite primary key 
Sql :: 0 
Sql :: SQL get last 5 minutes data 
Sql :: how-to-remove-mysql-root-password 
Sql :: choose only one for each distinct collumn regardless of other columns 
Sql :: oracle find foreign key dependencies 
Sql :: rebuild index sql server 
Sql :: how to recreate postgres database in docker 
Sql :: declare date variable sql 
Sql :: lost connection to mysql server during query when dumping table 
Sql :: sql or 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =