About 159,000 results
Open links in new tab
  1. Difference between row-based and statement-based replication in …

    In MySQL 5.5, statement-based format is the default. But it is better to use the mixed format. Because in that case, statement-based logging is used by default, but automatically switches to row-based logging in cases where-ever required.

  2. mysql - Creating Multiple Tables with WITH statements - Database ...

    Nov 8, 2018 · So when I had WITH statement right before table2 and before attempting to create table3; both table1 and table2 were created as intended and I was able to call their distinct column like this: WITH table2(c2, loc2) AS ( SELECT character2, location FROM lotrfirstencounters ), table1(c1, loc1) AS ( SELECT character1, location FROM ...

  3. execute () vs executeQuery () in MySQL Connector C++

    With MySQL Connector C++, I can use the sql::Statement::execute() function if I am going to modify the database (INSERT, UPDATE, DELETE, MERGE), or the sql::Statement::executeQuery() function if I am going to do a simple read only query.

  4. What's the most efficient way to batch UPDATE queries in MySQL?

    Apr 16, 2017 · It baffles me that, as far as I can tell, there's no idiomatic, efficient way to do this in MySQL. If there really isn't a way that's faster than ON DUPLICATE KEY, would it be worth it to switch to PostgreSQL and use its UPDATE FROM syntax? Any other suggestions are also greatly appreciated! Edit: here's one of the tables that gets updated ...

  5. mysql - error "--secure-file-priv option" when save selection to csv ...

    Dec 9, 2015 · LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv' INTO TABLE trial FIELDS TERMINATED BY ','; When I run above commands, I got "ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement"

  6. mysql - How to do While Loops? - Database Administrators Stack …

    Apr 9, 2014 · I use MySQL Workbench to make this. A quick stored procedure should do the job: DROP PROCEDURE IF EXISTS proc_loop_test; CREATE PROCEDURE proc_loop_test() BEGIN DECLARE int_val INT DEFAULT 0; test_loop : LOOP IF (int_val = 10) THEN LEAVE test_loop; END IF; SET int_val = int_val +1; SELECT int_val; END LOOP; END;

  7. What is the safest way to switch the binlog format at runtime?

    [Warning] Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted. I want to switch the replication format to MIXED. But according to the MySQL document:

  8. MySQL: Is it possible to have an IF subquery?

    I would probably convert it to a more-standard JOIN and a CASE statement, personally: SELECT t1.* ,CASE WHEN t1.tin > 0 THEN sp.name ELSE 0 END ,t2.productname ,t2.imagepath FROM cartitems AS t1 JOIN products AS t2 ON t1.productid = t2.id LEFT JOIN special_packaging sp ON sp.id = t1.tin WHERE t1.cartid = 8

  9. MySQL: Return JSON from a standard SQL Query

    Dec 2, 2017 · As a bonus, MySQL Shell also supports JavaScript and Python, though you can only get away from SQL statements if the server is set up as a document store. Then, once you've set the active schema, you can access relational tables via the db object. Whether using JS or Python, the statement corresponding to the above SQL query is the same:

  10. mysql - Query execution was interrupted, max_statement_time …

    May 7, 2011 · This feature with some changes was ported from Twitter MySQL patches Statement Timeout · twitter/mysql Wiki. WITHOUT switching to MySQL fork maintained and used at Twitter, what are my other options? Please advise.

Refresh