Welcome To Snipplr
Everyone's Recent SQL Snippets Tagged sql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This sql query will select the past version information about a given file from the database. An example would be searching for %ApprovalHistoryVOImpl% would return all past version numbers (in the database) for the ApprovalHistoryVOImpl.class file....
0
667
posted 15 years ago by theonlyalterego
Sometimes you want to return a bunch of data from a table, but you want it coming back in a random order. Maybe it's for keeping some content on a home page fresh. Here's how:
0
565
posted 15 years ago by blackf0rk
This is by no means the most efficient way to do this, in terms of performance.
It is however the easiest way.
1
622
posted 15 years ago by xtheonex
I was having the hardest time getting this to work. It's a collection of various items. For whatever reason, I needed to include the CASE statement due to NULL's coming back. If this helps you out... go for it.
0
557
posted 15 years ago by gembry
Create a random password using a Dictionary database table.
Selects a random word, and then appends two random numbers to the end, creating passwords in the form of: foozling98 or laicism11
1
600
posted 15 years ago by mynameisharry
Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.
0
615
posted 15 years ago by naspinski
When you make a login remember to use CASE SENSITIVE on password and case insensitive on username
0
726
posted 15 years ago by ginoplusio
Fields are tab delimited and need to match table schema.
I've found the tab separator ASCII(009) preferable over using a comma.
The second version can help remove double quotation marks around character fields.
Don't forget the keyword LOC...
0
845
posted 15 years ago by RICHARDP
This Oracle SQL snippet converts an Oracle SQL DATE to a STRING in the form CCYYMMDD.
0
1240
posted 15 years ago by retry
If you ever need to build a comma delimited list out of a column in SQL you can easily do this using the COALESCE function.
0
575
posted 15 years ago by mcbutterbuns
To grant all privileges to a user from any location login to the mysql shell and run the following queries.
3
653
posted 16 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1
648
posted 16 years ago by cbrant
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9
723
posted 16 years ago by chrisaiv