Inserting records into a MySQL table using Java

后端 未结 4 2117
北海茫月
北海茫月 2021-02-13 14:45

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),
          


        
4条回答
  •  日久生厌
    2021-02-13 15:27

    There is a mistake in your insert statement chage it to below and try : String sql = "insert into table_name values ('" + Col1 +"','" + Col2 + "','" + Col3 + "')";

提交回复
热议问题