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 2579 posted 17 years ago by cbrant
1 1228 posted 17 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 1550 posted 17 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 1346 posted 17 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1 1172 posted 17 years ago by cbrant
Wenn ein INSERT einen doppelten Wert erzeugen würde, wird das UPDATE ausgeführt.
1 981 posted 17 years ago by drk
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9 1385 posted 17 years ago by chrisaiv
It does not show the grants themselves, but shows all users with grants.
0 1157 posted 17 years ago by therobot
1 1368 posted 17 years ago by zingo
1 1107 posted 17 years ago by bassnode
4 1534 posted 17 years ago by andyhartleeds
You can generate a simple bar chart of the values by executing this command...
0 1254 posted 17 years ago by zingo
0 1135 posted 17 years ago by therobot
2 1159 posted 18 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 1347 posted 18 years ago by assbach
useful if a "valid until" should have an exact ( in this case far future ) value.
0 1056 posted 18 years ago by assbach
1 1149 posted 18 years ago by Shpigford
This will return the number of seconds between now and when the time field was inserted.
0 1484 posted 18 years ago by wolfie
7 1482 posted 19 years ago by brentroady
1 2 3 Next »