I want to make a sqlite table with a lot of columns.
The table and sqlite codes look like...
cur.execute('''CREATE TABLE MyTable
(AAA INTEGER PRIMARY KEY AUTOINCREMENT,
BBB INTEGER,
Col_1 TEXT,
Col_2 TEXT,
Col_3 TEXT,
Col_4 TEXT,
........There are 1000x columns here......
Col_1000 TEXT);
''')
Because there are so many columns, I use a list to generate the column names.
SQL_Title_List = []
for i in range(1, 1001, 1):
Temp = "Col_" + str(i)
SQL_Title_List.append(Temp)
My question is, how to write the SQL codes professionally? It'll be very painful to write them manually.
Thanks for your help!
Col_+ some number!