使用mysql创建表,jdbc

时间:2015-09-11 10:09:38

标签: java mysql jdbc

我在java程序中建立了连接和声明。当我尝试执行以下语句时,它会抛出我并错误

String details;
details="create table details(ID INTEGER,Name VARCHAR(255),Department VARCHAR(255))";
st.executeUpdate(details);

错误

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version 
for the right syntax to use near 'details(a INTEGER,name VARCHAR(255),id INTERGER)' 
at line 1

解释如何解决错误?

0 个答案:

没有答案