Home
> SQL Trivia > SQL Trivia – What are Niladic functions in SQL Server?
SQL Trivia – What are Niladic functions in SQL Server?
Niladic functions are functions that do not accept any parameters, are specified without parentheses, and return only one result.
Following is the list of Niladic functions:
Niladic function (SQL-92) | Value returned |
---|---|
CURRENT_TIMESTAMP | Current date and time. |
CURRENT_USER | Name of user performing an insert. |
SESSION_USER | Name of user performing an insert. |
SYSTEM_USER | Name of user performing an insert. |
USER | Name of user performing an insert. |
Execution of below query with these functions gives following results:
SELECT CURRENT_TIMESTAMP AS 'CURRENT TIMESTAMP' ,CURRENT_USER AS 'CURRENT USER' ,SESSION_USER AS 'SESSION USER' ,SYSTEM_USER AS 'SYSTEM USER' ,USER AS 'USER'
Categories: SQL Trivia
Niladic, Niladic Functions
Comments (0)
Trackbacks (1)
Leave a comment
Trackback
-
April 12, 2016 at 7:49 pmdata-konzept