Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in query using java code  RSS feed

 
Prasanna RamKumar
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote query to select the words that start with the particular letter
iam giving through java code
it is showing errors
ResultSet rs = st.executeQuery
("select rootwords from wordlist where rootwords like '"+input%+"' ");


where input is the particular word iam getting from user
 
Shailesh Chandra
Ranch Hand
Posts: 1084
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make a query like this


("select rootwords from wordlist where rootwords like '"+input+"%' ");

Shailesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!