Welcome To Snipplr


Everyone's Recent MySQL Snippets Tagged mysql



« Prev 1 2 3 4 5 6
  1. FAV

    mysql make access global

    This commands are useful in creating a username in mysql and it can be used to access the mysql globally with this username.
    MySQL 6 views posted 1 year ago by surentharp
  2. FAV

    Get Random Record Based on Weight

    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...
    MySQL 11 views posted 2 years ago by apphp-snippets
  3. FAV

    Configuration Mysql 5.7

    Some configurations for mysql 5.7
    MySQL 11 views posted 2 years ago by ironcrema
  4. FAV

    Show the output of a query in a more readable vertical format

    Show the output of a query in a more readable vertical format
    MySQL 14 views posted 3 years ago by rm1984
  5. FAV

    A example option file for mysql in windows

    `mysql-dev.ini` can be used in a developing environment and put it in the Mysql Home dir
    MySQL 9 views posted 5 years ago by jacktan
  6. FAV

    Mysql find duplicate values in field

    Mysql find duplicate values in field
    MySQL 9 views posted 5 years ago by flatearthcomms
  7. FAV

    Delete from table with limit (mySQL)

    Delete from table with limit (mySQL)
    MySQL 10 views posted 5 years ago by Kcko
  8. FAV

    consulta mysql count having

    query with count having
    MySQL 8 views posted 5 years ago by ironcrema
  9. FAV

    Extract the column names of a table (so you can select many columns but exclude some)

    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???')
    MySQL 9 views posted 5 years ago by imbraz
  10. FAV

    Project Management Database Setup Script

    Sets up the database for my project management software (in development - C#)
    MySQL 13 views posted 5 years ago by JordanRowles
  11. FAV

    Add current date to date field that is null

    MySQL 12 views posted 5 years ago by jlmarks
  12. FAV

    get list of all values in a field MySQL

    MySQL 12 views posted 5 years ago by jlmarks
  13. FAV

    Find and Replace with MySQL

    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...
    MySQL 12 views posted 6 years ago by apphp-snippets
  14. FAV

    Create a Database and Assign a User

    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.
    MySQL 9 views posted 6 years ago by apphp-snippets
  15. FAV

    MySQL Event scheduler

    This post will explain you the use of Event scheduler in MySQL.
    MySQL 12 views posted 6 years ago by kp32
  16. FAV

    MySQL Duplicate Rows With Updates

    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.
    MySQL 14 views posted 6 years ago by donkeykong
  17. FAV

    Agregar LLave Foránea MySql

    Convierte un campo de una tabla a llave foránea
    MySQL 5 views posted 6 years ago by ironcrema
  18. FAV

    Modify Column for Table Of Mysql

    Modify Column for Table Of Mysql
    MySQL 9 views posted 6 years ago by lyroge
  19. FAV

    Drop and Add Column for Table of Mysql

    Drop and Add Column for Table of Mysql
    MySQL 8 views posted 6 years ago by lyroge
  20. FAV

    Drop and Add Index for Table of Mysql

    Drop and Add Index for Table of Mysql
    MySQL 5 views posted 6 years ago by lyroge
  21. FAV

    Find duplicate mysql field vale

    Prints out a list of any field containing duplicates with count
    MySQL 16 views posted 6 years ago by flatearthcomms
  22. FAV

    MySQL_reset_root_pass

    Reset MySQL root password
    MySQL 5 views posted 6 years ago by Aminreza
  23. FAV

    gunzip mysql import/export

    Import/export gunzipped compressed mysql database
    MySQL 9 views posted 6 years ago by tzvio
  24. FAV

    La fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.

    Le fonction COALESCE de MySQL permet de renvoyer une valeur par défaut si la valeur null est renvoyée initialement.
    MySQL 6 views posted 7 years ago by pruntrut
  25. FAV

    [MySQL] Add condition to Virutal Fields

    By using HAVING 'virtual_field' CONDITION we can add conditions to virtual fields that created at SELECT
    MySQL 9 views posted 7 years ago by tucq88
  26. FAV

    What MySQL Table Has What Column

    How to find a given column in a given database in MySQL
    MySQL saved by 3 people 13 views posted 7 years ago by philsown
  27. FAV

    create new database

    Create a new database and its respective user with all privileges
    MySQL 11 views posted 7 years ago by claudiodev
  28. FAV

    Remap values inside a MYSQL query using CASE...WHEN syntax

    How to remap a value to another inside a mysql query select.
    MySQL 12 views posted 7 years ago by ginoplusio
  29. FAV

    MySQL - Simulate MySQL Queries

    You could start a transaction before running your queries and then rollback after running them. Note that to do this you'll require InnoDB or XtraDb tables (won't work on MyISAM).
    MySQL 20 views posted 7 years ago by satie83
  30. FAV

    Pivot table Schedule

    You have a schedule table (period, day, subject, room) with a primary key period,day to avoid duplicate bookings. You wish to display the schedule as periods, subjects and rooms in rows, and days of the week in columns.
    MySQL 6 views posted 7 years ago by cahyadsn
« Prev 1 2 3 4 5 6