Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged sql



1 ... 8 9 10 11 12
1 637 posted 14 years ago by pdswan
More for me than anything else
2 481 posted 14 years ago by iloveitaly
0 615 posted 14 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 667 posted 15 years ago by theonlyalterego
* be postgres user
0 443 posted 15 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 565 posted 15 years ago by blackf0rk
0 592 posted 15 years ago by smoover
select cast(floor(cast(getdate() as float)) as datetime)
0 627 posted 15 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 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
0 382 posted 15 years ago by manec
Just replace TABLENAME.OLD_COLUMNNAME and NEW_COLUMNNAME with your new values.
0 615 posted 15 years ago by naspinski
0 523 posted 15 years ago by ginoplusio
1 636 posted 15 years ago by ginoplusio
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
1 ... 8 9 10 11 12