Albert Lukaszewski

  • DDaudalagidcompartió una citahace 2 años
    The point of a cursor is to mark your place and to allow you to issue commands to the computer.
  • DDaudalagidcompartió una citahace 2 años
    A cursor in MySQL for Python serves as a Python-based proxy for the cursor in a MySQL shell session, where MySQL would create the real cursor for us if we logged into a MySQL database.
  • DDaudalagidcompartió una citahace 2 años
    By default, MySQL has autocommit switched on. Your database administrator will be able to confirm whether auto-commit is switched on. If it is not, you will need to commit any changes you have made.
  • DDaudalagidcompartió una citahace 2 años
    (the \G is the same command as \g, but it tells MySQL to display the results vertically):
  • DDaudalagidcompartió una citahace 2 años
    Where the semicolon is the statement delimiter in the MySQL shell, the backslash (\) is used to delimit lines within a statement.
  • DDaudalagidcompartió una citahace 2 años
    The HAVING clause is used for aggregate functions. It can be used to replace WHERE, but to do so is generally viewed as poor coding because it violates the SQL standard.
  • DDaudalagidcompartió una citahace 2 años
    The LIMIT clause is used to restrict the number of rows that are returned in the result set. It takes two positive integers as arguments. The first number indicates the point at which to start counting and counts from zero for that process. The second number indicates how many times to increment the first number by one in order to determine the desired limit.
  • DDaudalagidcompartió una citahace 2 años
    If you are programming for a web application and your database and web server are located on a single machine, you need to conserve your server resources.
  • DDaudalagidcompartió una citahace 2 años
    Therefore, you almost certainly want to use HAVING instead of LIMIT.
  • DDaudalagidcompartió una citahace 2 años
    The execute() method, as the name implies, expects an argument of what is to be executed by Python. In other words, it takes the MySQL sentence or statement as its argument. Its basic syntax is as follows:
    results_variable = cursor_handle.execute('MySQL statement')
fb2epub
Arrastra y suelta tus archivos (no más de 5 por vez)