SQL query: existing values in column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with 2 columns.

ColumnA ColumnB
apple fruit
ball
cat animal
dog animal
egg
fox animal

What should be my SQL query, if the output that I want are only the rows
with existing values in ColumnB, like this:

ColumnA ColumnB
apple fruit
cat animal
dog animal
fox animal
 
Try this

Select columnA,columnB From TableName Where columnB Is not Null And ColumnB
<> ""
 
in design veiw of the quiry in columnB Criteria type: is not null then all
those ColumnA entries without columnB will not be shown.

Cheers
 
Back
Top