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
1375
posted 15 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
883
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
671
posted 16 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1
657
posted 16 years ago by cbrant
Wenn ein INSERT einen doppelten Wert erzeugen würde, wird das UPDATE ausgeführt.
1
501
posted 16 years ago by drk
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9
737
posted 16 years ago by chrisaiv
It does not show the grants themselves, but shows all users with grants.
0
642
posted 16 years ago by therobot
You can generate a simple bar chart of the values by executing this command...
0
762
posted 16 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
663
posted 17 years ago by assbach
useful if a "valid until" should have an exact ( in this case far future ) value.
0
564
posted 17 years ago by assbach
This will return the number of seconds between now and when the time field was inserted.
0
808
posted 17 years ago by wolfie