2

I want to create a table as below:

import sqlite3 as sql
con = sql.connect('test.db')
cur = con.cursour()
sql_command = "create table test(dose float, Dose float, DOSE float)"
cur.execute(sql_command)

But i got an error: OperationalError: duplicate column name: Dose. I wonder how to make the table title case-sensitive?

Jimmy
  • 135
  • 2
  • 10

1 Answers1

3

Sqlite column names are case-insensitive, according to this. I think it is enforced on C level of implementation.

As a side-note, mixing column names dose, Dose, etc does not seem a great idea even if permitted, unless as an exploratory exercise.

Also this can be useful: Is SQL syntax case sensitive?

Evgeny
  • 4,173
  • 2
  • 19
  • 39