Create user is used to add a new user to the system. As discussed earlier user is similar to database except that a user can logon with a password and run queries. Below is the create user SQL
CREATE USER [user_name] FROM [dbname] AS
PERM = [bytes]
PASSWORD = [password/null]
STARTUP = [string]
TEMPORARY = [bytes]
DEFAULT DATABASE = [dbname]
COLLATION = [collation_sequence]
ACCOUNT = [account_id]
[NO] FALLBACK
[NO/DUAL] BEFORE JOURNAL
[NO/DUAL/LOCAL/NOTLOCAL] AFTER JOURNAL
DEFAULT JOURNAL TABLE = [name].[table_name];
SQL with parameter:
CREATE USER testuser FROM DBC
AS
PASSWORD=user1
PERM=2000000
SPOOL=5000000
TEMPORARY=0
STARTUP='SET SESSION ANSI'
ACCOUNT='$LUSER'
DEFAULT DATABASE=test
COLLATION= HOST
NO FALLBACK
NO BEFORE JOURNAL
NO AFTER JOURNAL;
Source: Teradata Manuals
Read more ...