What does the CREATE USER Statement do in SQL? What is the syntax and other details?

It’s pretty obvious what the CREATE USER statement does – it allows you to create a user in the database. Most of the popular databases out there already provide some sort of graphical interface that allows you to create users without actually typing in any SQL – like phpMyAdmin – which is a PHP interface to the MySQL database. In any case, the SQL standard defines the CREATE USER statement.


Here is what the syntax of the CREATE USER statement looks like:

CREATE USER username
[IDENTIFIED BY password]
[other options];

CREATE USER Identified By

The Identified By clause lets you say how the database should authenticate the user. The exact syntax of the Identified by clause varies from one database to another.

Hiring? Job Hunting? Post a JOB or your RESUME on our JOB BOARD >>

Subscribe to our newsletter for more free interview questions.

Leave a Reply

Your email address will not be published.