%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
JSTL: SQL action examples
SQL Update Execution
create table mytable (
nameid int primary key,
name varchar(80)
)
Inserting three rows into table
INSERT INTO mytable VALUES (1,'Paul Oakenfold')
INSERT INTO mytable VALUES (2,'Timo Maas')
INSERT INTO mytable VALUES (3,'Paul van Dyk')
DONE: Inserting three rows into table
SELECT * FROM mytable
<%-- An example showing how to populate a table --%>
<%-- Get the column names for the header of the table --%>
|
<%-- Get the value of each column while iterating over rows --%>
|
Deleting second row from table
DELETE FROM mytable WHERE nameid=2
DONE: Deleting second row from table
SELECT * FROM mytable
<%-- Yet another example showing how to populate a table --%>
<%-- Get the column names for the header of the table --%>
<%-- Each row is a Map object key'd by the column name --%>
|
<%-- Get the value of each column while iterating over rows --%>
|
drop table mytable