1

Am using volt db and need to insert list of values like shown below

field1 | field2 | field3 | field4
foo    | bar    | baz    | value one
foo    | bar    | baz    | value two
foo    | bar    | baz    | value four
foo    | bar    | baz    | value five

What is best way to do that any help much appreciated

recursion
  • 354
  • 6
  • 11
  • The term "list of values" is more of a web or UI concept. VoltDB is agnostic in that area, so it may help if you can clarify your question. Unless you're just asking if you can use CREATE TABLE and INSERT statements, in which case, yes you can. – BenjaminBallard Apr 23 '19 at 14:10
  • This is proper use case and inserting multiple values is not UI concept – recursion Apr 23 '19 at 14:13

1 Answers1

1

The best way to insert a list of values into a table is with a simple stored procedure, which can be defined in the schema. An example would be something like:

CREATE PROCEDURE procedure_name AS INSERT INTO table_name VALUES ?,?,?,?;

You can read more about stored procedures in the documentation: https://docs.voltdb.com/tutorial/Part5.php

Full disclosure: I work at VoltDB.

Andrew
  • 311
  • 1
  • 8