Forum: Building APIs & Wire Protocol

Post: Is it possible to create tables on the fly using java client and connecting to DB instead of using sqlcmd

Is it possible to create tables on the fly using java client and connecting to DB instead of using sqlcmd
nitiraj
Aug 11, 2016
I was looking at https://docs.voltdb.com/UsingVoltDB/SchemaTables.php for creation of table in VoltDB.

But my use case is where I do not know the table schema before hand. A user might want to create new table and put some data into it.
So I wanted to create the schema using the Client like it is used for stored procedures. Please let me know if that is possible? if yes, any documentation would be great.

Thanks in advance,
Nitiraj.
jhugg
Aug 11, 2016
You can send DDL using JDBC, or other clients using our @AdHoc system procedure.
https://docs.voltdb.com/v4docs/UsingVoltDB/sysprocadhoc.php

Just note that DDL and other SQL can't be mixed in a single transaction at this time.