Updating and Inserting Data

What is the use of a database if you cannot modify and add new data! Since SQuelized 1.1, we have added new support for custom Update Queries through the SQLConnection object

Update Queries

Generally, SQL queries that modify or insert data into a database are called Update Queries. Typical examples include INSERT INTO queries or DELETE queries. These queries do not give back results, but modify the database in different ways. While SQuelized has specific methods to do tasks such as data insertion, many users will still need to execute custom queries in their programs. This is why we have provided the updateQuery method.

Similar to the runQuery method to display records from a query, the updateQuery method accepts an SQL query in the form of a String, and will run the query if it is valid. If it is not, or some other error occurs, it will display it on the output terminal.