You are here

Query languages are computer languages used to make queries into databases and information systems.
snippet - MySQL simple update query example
15 Aug, 2018
There are actually two ways of updating in MySQL. This example uses the simpler way. Other way is to define columns and corresponding values sepparately.
snippet - MySQL: insert/update multiple rows with a single query
16 May, 2018
To insert multiple rows with a single query you can use regular insert with multiple value rows. You can also use update if you have primary key set.
snippet - Import csv to MySQL FAST
16 May, 2018
Import csv file to MySQL, the fastest way is to use a direct import with query. You have to have the columns created the way you need.
snippet - MySql error: Incorrect date value: '0000-00-00'
27 Jan, 2017
From version 5.7 MySQL stops supporting zeros value in date / datetime. If you have those values in your database you get errors for queries, like group by. Also you are not able to insert zero dates...
snippet - Is MySQL Table empty
21 Sep, 2016
If you need to show user different content whether a table is empty or not. So you would need to count table rows for that. Counting every row will iterate through the table rows and is really slow....
snippet - MySQL: Group by date when using datetime datatype
25 Apr, 2016
Group by date when using datetime datatype. In this snippet the grouping is used to pull out monthly statistics. The query is pretty much self explanatory. Group by in mysql can help you to bring...
snippet - MySQL: Convert table character set to utf8
14 Mar, 2014
Using this the query in this snippet enables you to convert character set to utf8. This works in mysql or mysql like database, drop-in databases like mariadb for an example.
snippet - MySQL: String Replace
9 Nov, 2013
Snippet showing, how to do string replace in MySQL. In this example we update a field with the same field content except we run it through string replace. This is the same as find...
snippet - Drop all tables from database in mysql
8 Nov, 2013
This snippet shows you how to drop all tables from database in mysql. Unsing drop database will just delete the database and later you just recreate it with create database query.
written tutorial - MySQL Joins - Visual Representation
22 Jul, 2013
Full guide for MySQL joins. Visual data and query examples should make the subject perfectly clear or you can bookmark it as a good reference. So here it is, the visual representation of sql (mysql)...
snippet - MySQL - Get first letters
10 Jul, 2013
This snippet shows you how to select discinct first letters of titles. After getting the first letters you might want to transliterate the characters, you can do it in mysql by custom function where...
snippet - MySQL - Remove trailing carriage return
5 May, 2013
Sometimes when you import lines from txt files you might get \r in the end of lines. When you think it's easier to remove trailing carriage returns than reimporting then you can use this query.
snippet - MySQL - Get years of from date field
21 Mar, 2013
If you have a lot of content with timestamps, you might want to get all the years where the content belongs. For an example created. With this query you can get years when some content was created.
snippet - Clear Data of MySQL Table
24 May, 2011
How to delete all rows of MySQL table. With reseting primary key auto increment and without reseting it.
snippet - MySQL Comments in Query
6 May, 2011
How to write comments in MySQL queries.
snippet - Delete all rows older than x minutes or any time in MySQL
6 May, 2011
This query example shows how to delete rows older than x amount of minutes, hours, days, months or even years. This is a part of MySQL date and time functions.