how can i select data from an access database using column values.

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

Guest

I am trying to access database and want to select records based on column
values.

My column name is "NAME" and the two values are "joe" and "phil"

I want to query the table using

select * from users where name="joe" and name="PHILE"
 
ganesh said:
I am trying to access database and want to select records based on
column values.

My column name is "NAME" and the two values are "joe" and "phil"

I want to query the table using

select * from users where name="joe" and name="PHILE"

That will never return any records, because no one record has both 'joe' AND
'phil' in it. Use OR instead of AND
SELECT * FROM users WHERE name='joe' OR name='phil'

You shouldn't have a field called 'NAME' nor a table named 'USERS' as these
are reserved words in Access.
 
Back
Top