Skip to content
Advertisement

Tag: java

Oracle Like Operator in Where condition and decode

I’m trying to write a PL-SQL query to return records from multiple table and using decode to allow null value comparison, The result is returning only where DeptName is exactly matching to the database values, but I want a query to return something e.Department like ‘%DeptName%’ Answer No need for anything other than boolean logic: If you want a NULL

How to return deleted rows using jdbi?

How do I return the deleted rows using jdbi? For example, I’d like to do something like this: Answer Postgresql has a returning keyword… https://dbfiddle.uk/?rdbms=postgres_13&fiddle=25d284309745e40c8ea29945481d1aa2 You can then execute that query in the same way as you would a normal SELECT statement, and get a result set back; containing the records deleted.

Java sql error when trying to update database

I am having a sql syntax issue when I am trying to update my databse through my update method which is trigured by a button here is the button code The update method code And the error Answer You missed the commas in the UPDATE statement. It should look like:

SQLite Database not getting updated

So Ive created an app where the user can input details about the movies he has watched such as name,cast,rating…ect and the details are stored in a database inside a table names which is initialized in the DataBaseHelper class as in the below segment of code Ive created a list view and displayed the names of the movies with a

MySQL Java prepared statement Syntax error

I need to select rows from mysql table based on various criteria, for example Colour= Black, or size= L. The code works without the preparedstatement and the question marks, but whenever I attempt to use the question marks the code does not run. I have read something about typing the question mark like ‘?’// but I am not sure about

Advertisement