Welcome To Snipplr


Everyone's Recent MySQL Snippets



« Prev 1 2 3 4 5 ... 8
A request to clear a single column in a table / MySQL /
0 744 posted 9 months ago by cerxx
This commands are useful in creating a username in mysql and it can be used to access the mysql globally with this username.
0 112 posted 2 years ago by surentharp
This snippet allows you to get random record from given table by weight. To run it, it must have a field named "weight". The more "weight" is assigned, the more often the record is selected. The value of "weight" should be an integer between 1 and 10...
0 134 posted 3 years ago by apphp-snippets
Some configurations for mysql 5.7
0 108 posted 3 years ago by ironcrema
Show the output of a query in a more readable vertical format
0 146 posted 4 years ago by rm1984
Thanks to Paras Jain
0 126 posted 4 years ago by yhauxell
Created as reply to question on ittoolbox.com:"Need your help in writing a query to pull audit history i.e. Last updated by a user 'XYZ' and for the same record key (ID) the second last record in the audit history table. i.e. Last update by this user...
0 145 posted 5 years ago by bvwatson
Consulta que permite convertir todas las tablas en colación utf8
0 118 posted 5 years ago by ironcrema
`mysql-dev.ini` can be used in a developing environment and put it in the Mysql Home dir
0 143 posted 5 years ago by jacktan
Mysql find duplicate values in field
0 149 posted 5 years ago by flatearthcomms
Delete from table with limit (mySQL)
0 142 posted 6 years ago by Kcko
query with count having
0 116 posted 6 years ago by ironcrema
This will get the names of all the columns as one long string ready to use in a select statement. N.B. There is a list of column names to exclude (In this case '???COLUMNS_TO_EXCLUDE???')
0 146 posted 6 years ago by imbraz
Sets up the database for my project management software (in development - C#)
0 132 posted 6 years ago by JordanRowles
Replace string mysql
0 121 posted 6 years ago by ironcrema
MySQL has a handy and simple string function REPLACE() that allows table data with the matching string to be replaced by new string. This is useful if there is need to search and replace a text string which affects many records or rows, such as chang...
0 149 posted 6 years ago by apphp-snippets
This is a very simple snippet about how to create a database 1st, a user and then assign some privileges to the user to allow him/her to perform some specific actions like insert, create, update, select etc.
0 141 posted 6 years ago by apphp-snippets
This post will explain you the use of Event scheduler in MySQL.
0 125 posted 6 years ago by kp32
I found this script and tried it. It worked. I thought it was useful for a variety of situations and is easy to follow. Often times I need nearly duplicated data and don't want to manually cut and paste.
0 133 posted 6 years ago by donkeykong
Convierte un campo de una tabla a llave foránea
0 106 posted 6 years ago by ironcrema
Modify Column for Table Of Mysql
0 146 posted 6 years ago by lyroge
Drop and Add Column for Table of Mysql
0 169 posted 6 years ago by lyroge
Drop and Add Index for Table of Mysql
0 162 posted 6 years ago by lyroge
Prints out a list of any field containing duplicates with count
0 124 posted 6 years ago by flatearthcomms
Reset MySQL root password
0 101 posted 6 years ago by Aminreza
Import/export gunzipped compressed mysql database
0 100 posted 7 years ago by tzvio
Le fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
0 153 posted 7 years ago by pruntrut
By using HAVING 'virtual_field' CONDITION we can add conditions to virtual fields that created at SELECT
0 99 posted 7 years ago by tucq88
« Prev 1 2 3 4 5 ... 8