ASP.NET, C#, SQL Server Reference

A Complete Dotnet Reference with Examples

Feb 11, 2010

Some basics in SQL Server

SET ROWCOUNT 1000
SET NOCOUNT ON

Randomly taking records from a table
Select empname, newID() Randomcol from emp where empid=1 order by newID()

@@Rowcount – is used to find number of rows effected by a sql statement
Select @@Rowcount AS rowcount
Posted by Dotnetin at 1:52 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ▼  2010 (38)
    • ►  June (8)
    • ►  May (6)
    • ►  March (3)
    • ▼  February (17)
      • Changing color of a cell in datagrid and gridview ...
      • AJAX Basics
      • Authentication and Authorization in asp.net
      • Dotnet questions for experienced people
      • Dotnet interview questions - FAQ's
      • Diff between intersect and innerjoin in SQL Server?
      • Cursors in SQL Server
      • Some basics in SQL Server
      • TO FIND THE 3RD HIGHEST SAL IN EMP TABLE
      • Normal Forms in SQL Server
      • ASP.Net Page life cycle - simple overview
      • Difference between sqlserver 2000 and sqlserver 2005
      • Events in GridView control of ASP.NET
      • Delegates in C# - Simple Explanation
      • Difference between abstract classes and interfaces...
      • Using unsafe code in C# in easy manner
      • ADO.NET basics reference
    • ►  January (4)