Self Studies

Interface Pytho...

TIME LEFT -
  • Question 1
    1 / -0.25

    Mandatory arguments required to connect any database from Python

  • Question 2
    1 / -0.25

    Which method of cursor class is used to fetch limited rows from the table?

  • Question 3
    1 / -0.25

    Which method of cursor class is used to insert or update multiple rows using a single query?

  • Question 4
    1 / -0.25

    Which method of cursor class is used to get the number of rows affected after any of the insert/ update/delete database operation executed from Python?

  • Question 5
    1 / -0.25

    _______ is the set of records that are retrieved after execution of SQL query over an established database connection.

  • Question 6
    1 / -0.25

    Which of the following is invalid method for fetching the records from database within Python?

  • Question 7
    1 / -0.25

    Which of the following method reflects the changes made in database permanently?

  • Question 8
    1 / -0.25

    The special control structure that facilitates row by row processing of records in resultset.

  • Question 9
    1 / -0.25

    Consider the following code:

    importMySQLdb

    d b = M y S Q L d b. c o n n e c t (‘l o c a l h o s t ’,

    ‘LIBMAN ’,‘Admin@pwd ’,‘library ’)

    cursor=db.cursor(prepared=TRUE)

    sql = “””Insert into table(‘MemId ’,

    ‘MemName ’,‘MemAdd ’,)values(‘%s ’,‘%s ’,‘%s ’, )”””

    insert_value=[(‘1021 ’, ‘Ronit ’, ’12, Block A, Kaveri

    Vihar ’),

    (‘1022 ’, ‘Smriti ’, ‘12/9 Indira Puram ’)]

    try:

    cursor.executemany(sql,insert_value)

    print(cursor.rowcount,“Recordsinserted ”)

    db.commit()

    except:

    db.rollback()

    cursor.close()

    db.close()

    Q. What of the following statement is connecting database server?

  • Question 10
    1 / -0.25

    Consider the following code:

    importMySQLdb

    d b = M y S Q L d b. c o n n e c t (‘l o c a l h o s t ’,

    ‘LIBMAN ’,‘Admin@pwd ’,‘library ’)

    cursor=db.cursor(prepared=TRUE)

    sql = “””Insert into table(‘MemId ’,

    ‘MemName ’,‘MemAdd ’,)values(‘%s ’,‘%s ’,‘%s ’, )”””

    insert_value=[(‘1021 ’, ‘Ronit ’, ’12, Block A, Kaveri

    Vihar ’),

    (‘1022 ’, ‘Smriti ’, ‘12/9 Indira Puram ’)]

    try:

    cursor.executemany(sql,insert_value)

    print(cursor.rowcount,“Recordsinserted ”)

    db.commit()

    except:

    db.rollback()

    cursor.close()

    db.close()

    Q. The role of the statement ‘cursor=db.cursor ’is:

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Submit Test
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now