Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged mysql



1 2 3 Next »
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 1342 posted 15 years ago by cbrant
1 700 posted 15 years ago by stancell
You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
0 859 posted 16 years ago by zingo
To grant all privileges to a user from any location login to the mysql shell and run the following queries.
3 643 posted 16 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1 643 posted 16 years ago by cbrant
Wenn ein INSERT einen doppelten Wert erzeugen würde, wird das UPDATE ausgeführt.
1 485 posted 16 years ago by drk
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9 714 posted 16 years ago by chrisaiv
It does not show the grants themselves, but shows all users with grants.
0 623 posted 16 years ago by therobot
1 783 posted 16 years ago by zingo
1 591 posted 16 years ago by bassnode
4 763 posted 16 years ago by andyhartleeds
You can generate a simple bar chart of the values by executing this command...
0 739 posted 16 years ago by zingo
0 613 posted 16 years ago by therobot
2 602 posted 16 years ago by micmath
2 things here. currency (euro) with in a 2.00 format and select entries older than 4 weeks = 28 days
2 635 posted 17 years ago by assbach
useful if a "valid until" should have an exact ( in this case far future ) value.
0 541 posted 17 years ago by assbach
1 637 posted 17 years ago by Shpigford
This will return the number of seconds between now and when the time field was inserted.
0 782 posted 17 years ago by wolfie
7 764 posted 17 years ago by brentroady
1 2 3 Next »