Answers for "create a table in ssms with python"

0

create a table in ssms with python

import pyodbc 
conn = pyodbc.connect('Driver={SQL Server};'
                      'Server=RON\SQLEXPRESS;'
                      'Database=TestDB;'
                      'Trusted_Connection=yes;')

cursor = conn.cursor()

cursor.execute('''

               CREATE TABLE People
               (
               Name nvarchar(50),
               Age int,
               City nvarchar(50)
               )

               ''')

conn.commit()
Posted by: Guest on June-15-2021

Code answers related to "create a table in ssms with python"

Python Answers by Framework

Browse Popular Code Answers by Language