I created a database with one table in MySQL:
CREATE DATABASE iac_enrollment_system; USE iac_enrollment_system; CREATE TABLE course( course_code CHAR(7),
There is a mistake in your insert statement chage it to below and try : String sql = "insert into table_name values ('" + Col1 +"','" + Col2 + "','" + Col3 + "')";
String sql = "insert into table_name values ('" + Col1 +"','" + Col2 + "','" + Col3 + "')";