I've below data.sql file in my src/main/resources/data.sql
file. I would like user tabel to be created from user.csv file.
DROP TABLE IF EXISTS `USER` CASCADE;
CREATE TABLE `user` AS SELECT * FROM CSVREAD('classpath:user.csv');
When the spring application starts it always errors out with below error -
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "drop table if exists [*]user CASCADE "; expected "identifier"; SQL statement:
I've spent long time to figure out the error but couln't. Any idea how can I fix this error?