1

I have a data table say i have a column like x which is primary key so i should get the row where this x values in empty.thanx in advance

3
  • 1
    can be primary key null in datatable? Commented Mar 10, 2011 at 12:18
  • 1
    I think he means the DataTable class of System.Data Commented Mar 10, 2011 at 12:23
  • ya correct its not sql table Commented Mar 10, 2011 at 12:31

2 Answers 2

1

SELECT x, y FROM table WHERE y IS NULL

Whoops, my bad:

dataTable.Select("FieldName IS NULL")

Sign up to request clarification or add additional context in comments.

3 Comments

Its a DataTable?.so where i should this query
but where i will be getting the output
It will filter your DataTable.
0

Another way is to use the WriteXml()- method, which writes the actual content of the DataTable-Object as XML. One is then able to parse it with LINQ to xml.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.