Icon CURRENT_COMPUTER

Returns the current computer's name as a string.

Syntax
CURRENT_COMPUTER()

Returns
VARCHAR

Usage
The CURRENT_COMPUTER function returns the current computer's name as a string.

Information When this function is used with the ElevateDB Server, it will always return the computer name for the ElevateDB Server machine.

Examples
-- This trigger logs information about
-- inserts, updates, and deletes,
-- including the computer the executed the
-- operation

CREATE TRIGGER "LogValues" AFTER ALL ON "customer"
BEGIN
   IF OPERATION() IN ('Insert','Update') THEN
      EXECUTE IMMEDIATE 'INSERT INTO AuditLog (Operation, Computer, Value)
         VALUES (?,?,?)' USING OPERATION(), CURRENT_COMPUTER(), NEWROW.MyColumn;
   ELSE IF OPERATION()='Delete' THEN
      EXECUTE IMMEDIATE 'INSERT INTO AuditLog (Operation, Computer, Value)
         VALUES (?,?,?)' USING OPERATION(), CURRENT_COMPUTER(), OLDROW.MyColumn;
   END IF;
END

SQL 2003 Standard Deviations
This function deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis function is an ElevateDB extension.
Image