Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged sql



1 ... 8 9 10 11 12
More for me than anything else
2 862 posted 15 years ago by iloveitaly
0 1003 posted 15 years ago by d020
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 1140 posted 16 years ago by theonlyalterego
* be postgres user
0 771 posted 16 years ago by kungfoo
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 911 posted 16 years ago by blackf0rk
0 972 posted 16 years ago by smoover
select cast(floor(cast(getdate() as float)) as datetime)
0 1035 posted 16 years ago by flurk118
This is by no means the most efficient way to do this, in terms of performance. It is however the easiest way.
1 1065 posted 16 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 908 posted 16 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 967 posted 16 years ago by mynameisharry
0 691 posted 16 years ago by manec
Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.
0 989 posted 16 years ago by naspinski
0 868 posted 16 years ago by ginoplusio
1 1103 posted 16 years ago by ginoplusio
When you make a login remember to use CASE SENSITIVE on password and case insensitive on username
0 1144 posted 16 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 1285 posted 16 years ago by RICHARDP
This Oracle SQL snippet converts an Oracle SQL DATE to a STRING in the form CCYYMMDD.
0 1721 posted 16 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 948 posted 17 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 1095 posted 17 years ago by cbrant
To reset the MySQL root password, login to the mysql shell and run the following commands.
1 1017 posted 17 years ago by cbrant
https://www.chrisjmendez.com/2008/03/23/mysql-commands-i-wish-i-could-remember/
9 1140 posted 17 years ago by chrisaiv
1 ... 8 9 10 11 12