<%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %> JSTL: SQL action examples

SQL Direct Query Execution

This example demonstrates how the row and columns can be directly accessed using various direct mechanisms.

create table mytable ( nameid int primary key, name varchar(80) ) INSERT INTO mytable VALUES (1,'Paul Oakenfold') INSERT INTO mytable VALUES (2,'Timo Maas') INSERT INTO mytable VALUES (3,'Paul van Dyk') SELECT * FROM mytable


Using the Row index and Column name

Row[0].NAMEID:
Row[0].NAME:
Row[1].NAMEID:
Row[1].NAME:
Row[2].NAMEID:
Row[2].NAME:

Using the Row and Column index

Row[0][0]:
Row[0][1]:
Row[1][0]:
Row[1][1]:
Row[2][0]:
Row[2][1]:
drop table mytable