You would have to concactinate the variable into your query.
E.g.
String VARIABLE = "00001"
"delete from TABLENAME where ID = \""+VARIABLE+"\""
so the above query would in actual fact yield
"delete from TABLENAME where ID = "00001"
The...
What you are missing in your SQL are the fields into which the values you have specified will go.
Here is an example.
There is a table called 'Person' with the following fields
1) Name varchar(20)
2) Age int(2)
3) Sex char(1)
The correct syntax will be
insert into person(name, age, sex)...
"select code from client where code not in (select code from members)"
The above query does not work in MySQL. Any suggestions or alternatives?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.