Dear Freinds

I want to get two rows out of 6 columns in datagrid from database out of 6 columns so kindly give me a query of this programme but give me linq to sql query thanks

Recommended Answers

All 2 Replies

select column1, column2 from table

You could try like this:

'To select top 2 rows from 2 out of 6 columns
Select Top(2) Column1, Column2 from YourTable

'To select all rows from 2 out of 6 columns
Select Column1, Column2 from YourTable

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.