This Tag <sql:update> Execute The Sql statement like Insert,Update or Delete.

In This Program We Execute the Update Query to inserting a value in Connected Database. First we made a database named ‘dbase’ and Table with required fields named ‘worker’. Then after declaring the required variable we call The Drivers and Other attributes that are must for accessing the procedure to execute program and sql query. Here in last we produce the output on web browser in tabular form.


<%@ taglib uri="" prefix="c"%>

<%@ taglib uri="" prefix="sql"%>



      <title>&lt;sql:update&gt;Jstl Tag</title>



             <sql:setDataSource var="db" driver="com.mysql.jdbc.Driver"

             url="jdbc:mysql://localhost/dbase"    user="root" password="root"/>

             <sql:update dataSource="${db}" var="updt">

                 INSERT INTO worker VALUES ('Ashu','Area Manager', 23, 18000);


                 <sql:query var="dt" dataSource="${db}">

                     select * from worker


                 <table border="1">







                       <c:forEach var="values" items="${dt.rows}">











      JSTL SQL <sql:update> Tag

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.