It is also possible to connect to any SQL query using the db_sql_select/2 predicate which takes an SQL string as its input and returns a list of field values. For example:
| ?- db_sql_select('SELECT * FROM EMP',L). L = [7369,SMITH,CLERK,7902,17-DEC-80,800,NULL,20]; L = etc ...
And you can use db_sql/1 for any other non-query SQL statement request. For example:
| ?- db_sql('create table test ( test1 number, test2 date)'). yes