Site Menu
- Home
- Products
- NexusDB
- Nexus Quality Suite
- NexusDB Drivers & Connectors
- Nexus Remoting
- Nexus Memory Manager
- Some of our Customers
- Testimonials and use(r)s
- Downloads
- Documentation
- Support
- Pricing & Orders
- About
- Community
- My Nexus
- Recently Updated ...
- Search...
- Site Login
Search
ITERATE statement
Wed, 03/04/2009 - 20:02 | hdanzl
Start a new iteration.
Syntax
Usage
The ITERATE statement can only be specified in the body of the REPEAT and WHILE statements to start a new iteration from the first statement in the block.
See also: LEAVE statement
Examples
1) | The following example shows the ITERATE statement used in SQL code: |
DROP FUNCTION IF EXISTS dummyFunc;
CREATE FUNCTION dummyFunc( p1 INTEGER )
RETURNS INTEGER
BEGIN
DECLARE v1, v2 INTEGER;
SET v1 = 10;
SET v2 = 10;
WHILE v1 > 0 DO
SET v1 = v1 - 1;
IF v1 <= 5 THEN
ITERATE;
END IF;
SET v2 = v2 - 1;
END WHILE;
RETURN v2 + p1;
END;
SELECT dummyFunc( 15 ) FROM #dummy;
Conformance
SQL:2003 standard |
- - |
SQL/PSM Feature P002-08 "ITERATE statement" Statement label is not supported |
Questions? Problems?
- Interested to buy but something put you off?
- Can't find what you're looking for?
- Have a suggestion?
Let us know. If you're having trouble contacting us, please check here.
Site Updates
- Dec 4 2024 - 1:53pm
- Dec 4 2024 - 1:48pm
- Nov 19 2024 - 1:04pm
- Oct 17 2024 - 10:27am
- Jul 24 2024 - 1:22pm