Welcome To Snipplr
Everyone's Recent SQL Snippets Tagged sql
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I found this and simply want to store it. It was done by Valentino Vranken
2
2448
posted 14 years ago by ezerick
creates a user that has only access to one database, from any host
1
839
posted 14 years ago by manuelstofer
Re-seed identity table if rows were deleted/there are gaps in numerical order
2
465
posted 14 years ago by CDIDevs
Using SQL you can have your database return the distance between 2 sets of Lat and Long points, and using some math functions also take into account the curvature of the earth.
3
974
posted 14 years ago by zingo
A Temp table is great for combining multiple SELECT statements in a Sproc and outputting as just one table.
Don't forget to Drop the table after the SELECT * FROM #TempTableName at the end.
2
941
posted 14 years ago by highlyevolved
These statements convert a date/time field into just a date or a time field
2
757
posted 14 years ago by highlyevolved
Delete All Foreign Keys in a database;
(make sure you USE keyword)
2
560
posted 14 years ago by marcocs
I am forever forgetting this. Have to look up the 101 vs 103 in books online every time.
Also forget which way around is US/NZ format. :-)
1
788
posted 14 years ago by rengber
From StackOverflow. I'm still not quite happy with my understanding of it, but it looks an order of magnitude more elegant than most I've found.
0
714
posted 14 years ago by rengber