Category: mySQL

Bookmark and Share

Get MySQL Database Size - Useful shell commands for determining overall DB size.
Get ordered list of near match items based on tag matches - Returns an ordered list of near match items based o...
Grouping rows by frequency - Handy little query that groups rows by frequency.
Import file - Import a file from the command line.
Inverted UNION (the opposite of UNION) - This finds all rows in table_1 with an ID that isn't present in table...
Lead-In Sentence fragment... - As a "preview" of text, this MySQL select will return the first few words out of...
Make comma-separated list of strings - Build a comma-separated list of strings in mySQL.
Move position of mySQL field - Move field position while still retaining its content.
MySQL Capitalize - Capitalizing in MySQL.
mySQL Fake Union Code - Handy code for any version of mySQL that doesn't have the UNION function.
MYSQL Select time from a date - If you have a date field in mysql of format: 09/02/2005 13:52 and you wis...
Opposite of mysql_fetch_assoc - The mySQL_fetch_assoc "converts" a row from a table into an associative array. ...
Password setup - Set up passwords from the mysql console.
Rebuild table indexes - Rebuild indexes on a mySQL table.
Remove Duplicates - remove duplicates in one pass at the table
Replace a NULL with a given value. - Replace a NULL with a given value.
Reset auto increment value - This resets the AUTO-INCREMENT value for a given table.
Return text between delimiters in MySQL - Returns the text between the specified delimiters in MySQL.
Search and Replace - Very fast search and replace 1-liner.
Select based on a field that can have a NULL value - This is an example of a SELECT statement based on a field ...
Select distinct/unique entries - This query will return only distinct (unique) entries from the table searched.
SELECT Example Using REGEXP - An example of a SELECT statement that uses a Regular Expression
SELECT from multiple tables. - SELECT from multiple mySQL tables.
Select maximum value - Selects the maximum value of the column in the brackets.
Select minimum value - Selects the minimum value of the field in the brackets.
Select or match a range of dates - Match a range of dates in the 'games' table.
Select row number in MySQL - Simple and straightforward: select the row number in mySQL.
SELECT within SELECT (SubSelect) - Example of doing a SELECT within a SELECT (a subselect).
Sort comma separated string - This User Defined Function sorts comma separated sub strings within a string.
Update and Subtract single query - Simple way to update and add (or subtract) a value to a column.

© | users online: 10