Login ProductsSalesSupportDownloadsAbout |
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 Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |