0

I tried to create a table in ms SQL's local server. I am pretty sure my syntax is correct however every time after I ran the code the table never gets produced. This same code however is able to SELECT from a table that is already in the database. Please advise ! Thank you

import pypyodbc
conx = pypyodbc.connect("Driver={SQL Server Native Client 11.0};"
                              "Server=DE;"
                               "Database=ZB;"
                               "trusted_connection=yes;")
cur = conx.cursor()
cur.execute("CREATE TABLE person(id INT, name VARCHAR(100))")
conx.close()
Johnseito
  • 315
  • 1
  • 9
  • 24

0 Answers0