基本 sql 语句

1
select field, from table_name where fielid3 like '%xxx%'

JDBC中的使用

1
2
3
4
5

String sql="select * from blogTable where title like ?";
preparedStatement=connection.prepareStatement(sql);
String keyword_v2="%"+keyword+"%";
preparedStatement.setString(1,keyword_v2);