RedTerminal
RedTerminal

Reputation: 37

How can we execute a query in Julia with column names inside a list?

I want to execute a query like:

SELECT SID,SNAME,MARKS FROM TABLE;

But this should be achieved in Julia with the column names inside a list:

columns = ["SID","SNAME","MARKS"]

Upvotes: 0

Views: 63

Answers (1)

RedTerminal
RedTerminal

Reputation: 37

fieldnames = ["col1","col2"]

query = "select "*join(fieldnames,",")*" from table;"

Upvotes: 1

Related Questions