title: sqlite3.OperationalError: near "show": syntax error
body: <p>I am building a table in <code>pyqt5</code> which will show the output of <code>SQL</code> in the table. First you have to type the command in command line and then press the button to update the table. </p>
  
  <p>Although, the commands like <code>insert into table</code> are working but when i type <code>show databases;</code> in the command line it is showing me this error: </p>
  
  <pre><code>Traceback (most recent call last):
    File "c:/Users/intel/Desktop/table.py", line 24, in load_data
      result = connection.execute(inp)
  sqlite3.OperationalError: near "show": syntax error
  </code></pre>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>import sys
  from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QAction, QTableWidget,QTableWidgetItem,QVBoxLayout
  from PyQt5.QtGui import QIcon
  from PyQt5.QtCore import pyqtSlot
  from PyQt5 import QtWidgets
  import sqlite3
  
  inp = input('&gt;&gt; ')
  
  class App(QWidget):
      def __init__(self):
          super().__init__()
          self.title = 'PyQt5 table - pythonspot.com'
          self.left = 0
          self.top = 0
          self.width = 300
          self.height = 200
          self.initUI()
  #CREATE TABLE employees(email varchar(30), password(30));
      def load_data(self):
          connection = sqlite3.connect('my_db.db')
          #connection.execute(inp)
          #
          result = connection.execute(inp)
          self.tableWidget.setRowCount(0)
  
          for row_number, row_data in enumerate(result):
              self.tableWidget.insertRow(row_number)
              for column_number, data in enumerate(row_data):
                  self.tableWidget.setItem(row_number, column_number, QTableWidgetItem(str(data)))
  
          connection.close()
  
      def initUI(self):
          self.setWindowTitle(self.title)
          self.setGeometry(self.left, self.top, self.width, self.height)
  
          self.createTable()
  
          # Add box layout, add table to box layout and add box layout to widget
          self.layout = QVBoxLayout()
          self.layout.addWidget(self.tableWidget) 
          self.setLayout(self.layout) 
  
          self.btn = QtWidgets.QPushButton(self)
          self.btn.move(100,600)
          self.btn.setText("Hello")
          self.btn.clicked.connect(self.load_data)
          # Show widget
          self.show()
  
      def createTable(self):
  
          self.tableWidget = QTableWidget()
          self.tableWidget.setRowCount(1) ##set number of rows 
          self.tableWidget.setColumnCount(8) ##this is fixed for myTableWidget, ensure that both of your tables, sql and qtablewidged have the same number of columns 
  
  
          self.tableWidget.move(1,1)
  
          # table selection change
          self.tableWidget.doubleClicked.connect(self.on_click)
  
      @pyqtSlot()
      def on_click(self):
          print("\n")
          for currentQTableWidgetItem in self.tableWidget.selectedItems():
              print(currentQTableWidgetItem.row(), currentQTableWidgetItem.column(), currentQTableWidgetItem.text())
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      ex = App()
      sys.exit(app.exec_()) 
  </code></pre>
  
  <p><strong>Any help would be appreciated!!</strong></p>