First you have to import the DatabaseConnector module to your project https://marketplace.mendix.com/link/component/2888
Now you need to build your own SQL query statement to execute via the ExecuteQuery or ExecuteStatement Java actions from DatabaseConnector module.
ExecuteStatement is used to INSERT, UPDATE, DELETE & DDL queries.
For more details refer this https://docs.mendix.com/appstore/connectors/database-connector/
Hope it helps!