Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
select from tablename where theRowNumber = 1 ///first row >>>and so on just i want to give
///the row no any value of columns
Posted
Updated 3-May-13 22:05pm
v3

Here's something. Assuming the table [tablename] was made like this:
--USE [cpqaAnswers]
--GO
--CREATE SCHEMA [cpqa]
CREATE TABLE [cpqa].[tablename](
   [row][nvarchar](76)
    )

Do this:
CREATE TABLE [cpqaAnswers].[cpqa].[tablenameIdx](
   [theRowNumber][int]IDENTITY(1,1),
     [row][nvarchar](76)
     )

Then, do this:
INSERT INTO [cpqaAnswers].[cpqa].[tablenameIdx]
  SELECT * FROM [cpqaAnswers].[cpqa].[tablename]

Now there's an index prefixed to the previous data table and, using the assignment style mentioned, each line of data is accessible through it.
 
Share this answer
 
Comments
mahmoud.abdallah 4-May-13 23:36pm    
thnks
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900