In Mysql, if you want to either updates or inserts a row in a table, depending if the table already has a row that matches the data, you can use “ON DUPLICATE KEY UPDATE”. INSERT INTO employees(id, name, hire_date ) VALUES (1, 'John', '2016-11-29' ) ON DUPLICATE KEY UPDATE ... Read more
Tag Archives: Mysql
Batch import RTF files into MySQL BLOB without programming
Want to batch import RTF (Rich Text Format) documents into MySQL TEXT (CLOB) or BLOB column? Using MyLobEditor, you can import bulk rtf files into MySQL TEXT (CLOB) or BLOB easily and fast, just a few mouse clicks. Here you can download and install MyLobEditor. Batch import RTF documents to ... Read more
Some ETL (Extract-Transform-Load) tools for MySQL
Withdata Software provide some ETL (Extract-Transform-Load) tools for MySQL: FileToDB Load TXT, CSV, TSV, XML, JSON, Excel, SQL, RDF, INI data to MySQL DBToFile Export MySQL data to TXT, CSV, TSV, XML, JSON, Excel, SQL files DBCopier Copy data between MySQL and other rational ... Read more
Some data import / export tools for Percona
Withdata Software provide some tools for MySQL, all these tools can work for Percona: See how to use these tools work for Percona: Import XML data into Percona (MySQL) Schedule and automate Percona (MySQL) importing XML data task Import data into Percona (MySQL) from MongoDB exported JSON ... Read more
Parse RDF file and save to MySQL
Want to parse RDF file and save to MySQL ? Want to schedule and automate this importing task? To import Xml format RDF file (.rdf, .owl) to MySQL (MariaDB, Percona), https://www.withdata.com/blog/rdftomysql/mysql-import-rdf.html To import RDF Turtle file (.ttl, .n3) to MySQL (MariaDB, ... Read more
How to select N random records from a MySQL table
If you want to select N random records from a MySQL table, you need to change the clause as follows: select * from tableName order by rand() limit N For example, to select 5 random customers in the customers table, you use the following query: select * from customers order by rand() limit 5 Some ... Read more
Some data import / export tools for MariaDB
Withdata Software provide some tools for MySQL, all these tools can work for MariaDB: See how to use these tools work for MariaDB: Import XML data into MariaDB (MySQL) Schedule and automate MariaDB (MySQL) importing XML data task Import data into MariaDB (MySQL) from MongoDB exported JSON ... Read more
How to get index column names of a table from MySQL
SELECT INDEX_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA = 'my_schema_name' AND TABLE_NAME = 'my_table_name' See also: How to get index column names of a table from DB2 How to get index column names of a table from SQL Server How to get index column names of a table ... Read more
How to get primary key of a table from MySQL
select COLUMN_NAME,INDEX_NAME from INFORMATION_SCHEMA.STATISTICS where TABLE_SCHEMA = 'my_schema_name' and TABLE_NAME='my_table_name' and INDEX_NAME='PRIMARY' See also: How to get primary key of a table from PostgreSQL How to get primary key of a table from SQLite How to get primary key of a ... Read more
Withdata Software Released MyLobEditor Version 2.1
Withdata software has announced mylobeditor 2.1, a tool that helps you edit MySQL lob (blob, text (clob)) data directly. Version 2.1 Add “Create sub folders by field name”. Add “turning off log” in command line. MyLobEditor – Edit MySQL LOB data directly MyLobEditor ... Read more