#mysql

Interesting Links, 15 Sep 2016

It may be a little early to suggest that Eclipse is dead, but “The Fall of Eclipse” says it anyway, and says why. The Eclipse community would disagree, of course. User liste pointed out MariaDB4j, which is… MariaDB embedded into a jar, suitable for integration testing with MariaDB in a build tool. Sure, H2 and Derby exist, but this allows you to test against MySQL and MariaDB, because if you have to use MySQL in...

2 minute(s) read

Using SQL's "IN" in JDBC

In SQL, the IN operator is used to restrict columns to one of a set of values. Using IN in JDBC, though, is sometimes problematic because of the way different databases handle prepared statements. With JDBC, prepared statements use ? to serve as markers for values in a SQL statement. Thus, you might see: PreparedStatement ps=connection.prepareStatement("SELECT * FROM FOO WHERE BAR = ?"); This serves to help prevent SQL injection attacks; assigning a value of "'' or...

4 minute(s) read