Database
Mimic The MySQL LIMIT Feature in Microsoft SQL Server
MySQL includes a nifty feature that lets you select only rows 1-10, 11-20, or any set you want. Microsoft SQL Server does not include this feature. This recipe will show you how to mimic the same feature easily without stored procedures.
Microsoft’s T-SQL includes the TOP syntax, which allows you to select only the top x [...]
SQL Server 2005: How to Attach (or Reattach) a Database Missing the LDF
If you need to attach a database that has no log file (.LDF), or have deleted the log file because it was too big and need to reattach the database, SQL Server 2005 does allow you to do this. You can attach the database by following this Tech-Recipe:
1. Open the SQL Server Management Studio and [...]
SQL Server 2005: What Service Pack is Installed?
If you’re running SQL Server, it’s very wise to make sure that you have the latest service pack installed for optimum performance. If you’re not sure what service pack you have installed (or if you’re still running RTM), follow these steps to find out:
1. Open SQL Server Management Studio.
2. Click the New Query button.
3. Copy [...]