Create SQL TABLE with Variable name

#1

Good Afternoon,

I’m trying to write a script that creates tables to my database, I want to name the table with the contents of a string variable,
is this possible?

0 Likes

#2
tableName = your string
system.db.runUpdateQuery("""CREATE TABLE "%s" (Name VARCHAR(100) NOT NULL)""" % tableName)
0 Likes