Welcome To Snipplr
Everyone's Recent SQL Snippets Tagged mysql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5
2171
posted 17 years ago by cbrant
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
1372
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
1111
posted 17 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1
1032
posted 17 years ago by cbrant
Wenn ein INSERT einen doppelten Wert erzeugen würde, wird das UPDATE ausgeführt.
1
846
posted 17 years ago by drk
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9
1151
posted 17 years ago by chrisaiv
It does not show the grants themselves, but shows all users with grants.
0
1035
posted 17 years ago by therobot
You can generate a simple bar chart of the values by executing this command...
0
1154
posted 17 years ago by zingo
2 things here. currency (euro) with in a 2.00 format and select entries older than 4 weeks = 28 days
2
1084
posted 18 years ago by assbach
useful if a "valid until" should have an exact ( in this case far future ) value.
0
949
posted 18 years ago by assbach
This will return the number of seconds between now and when the time field was inserted.
0
1263
posted 18 years ago by wolfie