用python统计数据库sqlite中某

发布时间:2019-09-25 08:24:31编辑:auto阅读(1832)

            conn.execute('''CREATE TABLE IF NOT EXISTS ADDRESSDB(MacAddress CHAR(50),NewAddress  CHAR(50) );''')
            cursor = conn.cursor()
            c=cursor.execute('''SELECT * FROM ADDRESSDB''')
            r=c.fetchall()
            print(len(r))
            cursor.close()
            print("Table created successfully")
            conn.close()

关键字