mycursor =mydb.cursor() sql ="DROP TABLE customers" mycursor.execute(sql) Run example » Drop Only if Exist If the table you want to delete is already deleted, or for any other reason does not exist, you can use the IF EXISTS keyword to avoid getting an error. ...
WillExecute src,cursortyp,locktyp,options, status,objcomm,objrs,objconn ExecuteComplete recaffected,objerror,status, objcomm,objrs,objconn ParameterDescription srcA string that contains an SQL command or a stored procedure name cursortypSpecifies the type of cursor to be used. One of theCursorTyp...