SQLJ
1 program
Added 2026-03-11T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Embedded SQL for Java, ISO SQLJ
Provenance: commit 4589f00f4e · authored 2026-03-11T18:43:46+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Employee Salary Query with Iterator
Provenance: commit 4589f00f4e · authored 2026-03-11T18:43:46+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
import java.sql.*;
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
#sql iterator EmpIterator(String ename, double sal);
public class EmpQuery {
public static void main(String[] args) throws Exception {
double threshold = 2000.0;
EmpIterator iter;
#sql iter = {
SELECT ename, sal
FROM emp
WHERE sal > :threshold
ORDER BY sal DESC
};
System.out.println("Employees earning over $2000:");
while (iter.next()) {
System.out.printf(" %-10s $%.2f%n", iter.ename(), iter.sal());
}
iter.close();
}
}