Search
 
SCRIPT & CODE EXAMPLE
 

SQL

encrypt password postgresql

CREATE EXTENSION pgcrypto;

INSERT INTO users (email, password) VALUES (
  'johndoe@mail.com',
  crypt('johnspassword', gen_salt('bf'))
);

SELECT id 
  FROM users
 WHERE email = 'johndoe@mail.com' 
   AND password = crypt('johnspassword', password);
Comment

create user with encrypted password postgresql

CREATE USER username ENCRYPTED PASSWORD 'pass';
Comment

PREVIOUS NEXT
Code Example
Sql :: mssql unique key accept nulls 
Sql :: Inser Dataframe into mysql 
Sql :: oracle undo usage per session 
Sql :: mysql inner join 
Sql :: microsoft sql server management studio uppercase shortcut 
Sql :: index postgres 
Sql :: insert into table using openquery 
Sql :: generate random data in mysql 
Sql :: codeigniter dbforge add index 
Sql :: how to install sql server management studio in ubuntu 18.04 
Sql :: cast as decimal postgresql 
Sql :: MySQL OR 
Sql :: copy data from one database to another 
Sql :: oracle job schedules 
Sql :: insert ip address in mysql 
Sql :: create table 
Sql :: mysql preg replace 
Sql :: sql round datetime 
Sql :: snowflake insert select 
Sql :: mysql date comparison with formatting 
Sql :: Write an SQL query to determine the 5th highest salary without using TOP or limit method. 
Sql :: connect laravel to mysql on mac 
Sql :: _ Wildcard in SQL 
Sql :: equi join in sql 
Sql :: Power BI merge tables same columns 
Sql :: SELECT SQL LIKE 
Sql :: sql and or 
Sql :: sql limit results 
Sql :: UPDATE SQL RAHULDEV 
Sql :: sql server set complex constraints 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =