![]() | Products |
| Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » SET |
SET <TargetName> = <Expression> [,<TargetName> = <Expression>] <TargetName> = <VariableName>|<ParameterName>|NEWROW.<ColumnName>
-- This function uses the SET
-- statement to assign the count of the
-- rows in the Customers table to the
-- result variable returned from the function
CREATE FUNCTION CountCustomers()
RETURNS INTEGER
BEGIN
DECLARE Test SENSITIVE CURSOR FOR stmt;
DECLARE Result INTEGER DEFAULT 0;
PREPARE stmt FROM 'SELECT * FROM Customers';
OPEN Test;
FETCH FIRST FROM Test;
WHILE NOT EOF(Test) DO
SET Result = Result + 1;
FETCH NEXT FROM Test;
END WHILE;
RETURN Result;
END| Deviation | Details |
| None |
This web page was last updated on Tuesday, September 16, 2025 at 04:56 PM | Privacy Policy © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

