md5 Encryption PostgreSQL

4

I am creating a table using PostgreSql and in it there will be a password field with MD5 encryption. How would the syntax be in it? Because I have more contact with MySQL than PostgreSQL.

    
asked by anonymous 04.11.2018 / 21:59

1 answer

4

Use:

MD5('String')

For example:

INSERT INTO users (username, password) VALUES ('Luiz', MD5('Segredo'));
    
04.11.2018 / 22:05