DDL Queries
Learn how to execute a DDL query using the JdbcTemplate class.
We'll cover the following...
Data Manipulation Language (DML) queries are the one where we manipulate the data in the table. In a rare scenario, we might want to create a table which is a Data Definition Language (DDL). In that case, we can use the execute()
method of the JdbcTemplate
.
Create table query
Let’s say we want to create a Tournament
table to store details of a tennis tournament. In the PlayerDao
class we will create a method called createTournamentTable()
with a CREATE TABLE
query.
Access this course and 1400+ top-rated courses and projects.