SET PASSWORD
Description
This statement is used to change the password of the currently logged-in user or another user in seekdb.
Syntax
SET PASSWORD [FOR user] = password_option;
password_option: {
PASSWORD('authstring')
|'hashstring'
}
Parameters
| Parameter | Description |
|---|---|
| FOR user | If the FOR user clause is not specified, the password of the current user will be changed. Any successfully logged-in user can change the password of the current user. If the FOR user clause is specified, the password of the specified user will be changed. You must have the global CREATE USER privilege to change the password of the specified user. |
| password | By default, the password is transmitted in plaintext and will be encoded in the kernel. |
Examples
-
Change the password of the current user.
SET PASSWORD = PASSWORD('**1***');
Query OK, 0 rows affected (0.034 sec) -
Change the password of the
sqluser01user.SET PASSWORD FOR sqluser01 = PASSWORD('**2***');
Query OK, 0 rows affected (0.041 sec)