There are times when you would want to generate your own serial numbers for a query. For eg: If we take the Customers table in Northwind database, the CustomerID is not numeric Eg: 'ALFKI'.
If you want to generate your own serial number for the Customers table while displaying the records, use the ROW_NUMBER(). As mentioned in BOL "ROW_NUMBER() returns the sequential number of a row within a partition of a result set, starting at 1 for the first row in each partition"
Here is a query that will help you generate your own serial numbers for the CustomerID
SELECT (ROW_NUMBER() OVER ( ORDER BY CustomerID)) AS ID ,
CustomerID, ContactName, CompanyName, ContactTitle
FROM Customers
asp classic vb6: upload multipe image. Rename files and delete.
-
hi, i try to upload a multiple image files. after that i will rename the
files name. the problem is when i upload a 2 or more same files name...
1 hour ago
0 comments:
Post a Comment