Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

table in sqlite python

import sqlite3

# it will create a databse with name sqlite.db
connection= sqlite3.connect('sqlite.db')

cursor = connection.cursor()

# table name = Website 
# Table fields are 
# Post: Text type
# Autor: Text type
# Views: Real type

cursor.execute('''CREATE TABLE Website
               (Post text, Autor text, Views real)''')

# Save (commit) the changes
connection.commit()

# close connection
connection.close()
Comment

PREVIOUS NEXT
Code Example
Python :: how to remove an element from dictionary using his value python 
Python :: pandas df exact equals 
Python :: composition in python 
Python :: Python program to find uncommon words from two Strings 
Python :: re date python 
Python :: python index of lowest value in list 
Python :: how to stop thread python 
Python :: change python version in colab 
Python :: super in django manager 
Python :: dataframe cut based on range 
Python :: make sure it only has letters and numbers python 
Python :: how to generate random number in python 
Python :: python mqtt subscribe code 
Python :: pandas dataframe drop rows with -ve in column value 
Python :: missing data in python 
Python :: numpy random 
Python :: how to numbered jupyter notebook 
Python :: how to find and remove certain characters from text string in python 
Python :: appending items to a tuple python 
Python :: NLP text summarization with Luhn 
Python :: pandas series example 
Python :: python dataframe calculate difference between columns 
Python :: python update header row 
Python :: from django.urls import re_path 
Python :: how to add a column with more rows to a dataframe 
Python :: Matplotlib add text to axes 
Python :: python fill string with spaces to length 
Python :: while True: 
Python :: python Sort the dictionary based on values 
Python :: pandas subplots 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =