Python Forum

Full Version: Creating Tables in SQL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Trying to create a create a table in SQL based on user input for example:
City= input(blah blah)
C.execute(CREATE TABLE IF NOT EXISTS ????? )
Hi,

your code won't work. Line 1 will give a NameError and assuming the code would move to line 2, it gives a NameError as well.

In case you need help, it may be an extremely good idea to describe your problem with more than one sentence and show at least Python code which does not contain super obvious errors.
If you have no motivation to achieve something, why we should put any efforts in helping you to solve your problem?

Regards, noisefloor
Not to mention that this is a super standard problem and that complete solutions can easily be found on the web.