Selecting 5 random rows in SQL is easy
select top 5 * from users order by newid()
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: [...]
I spent a few days playing with Ruby on Rails a while back. During the learning experience, there was one particular feature that I really liked. It was the database migration scripts that get automatically generated for you. I always wished I had something like this in the windows (asp.net) world. It turns out there [...]
Here is a great sql script that will look at your table and generate a script to insert all the data. This is very useful when moving databases or when you want to create a database setup in your application with some default data. Note that I haven’t tried this procedure and it [...]
Wednesday, December 16, 2009
Comments