469,568 Members | 1,467 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,568 developers. It's quick & easy.

Simple Select Problem

MySQL 4.0.13-nt

I have a table:
CREATE TABLE state_county (
StCo_key bigint(20) NOT NULL auto_increment,
State varchar(255) NOT NULL default '',
County varchar(255) NOT NULL default '',
Territory bigint(20) NOT NULL default '0',
Hits bigint(20) NOT NULL default '0',
PRIMARY KEY (StCo_key,State),
UNIQUE KEY StCo_key (StCo_key),
KEY State (State),
KEY StCo_key_2 (StCo_key)
) TYPE=MyISAM;

When I execute the any of these queries:
SELECT `StCo_key` , `State` , `County` , `Territory` , `Hits`
FROM `state_county`
WHERE `State` = 'Iowa'

SELECT *
FROM `state_county`
WHERE `State` = 'Iowa'

SELECT *
FROM `state_county`
WHERE `State` = "Iowa"

I get an empty set. If I execute:
SELECT *
FROM `state_county`
WHERE `StCo_key` = "1"

I get the result.

What do I need to do to get the `State` querey to work?

TIA,

Paul
Jul 19 '05 #1
0 1059

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by unixman | last post: by
2 posts views Thread by Gerry | last post: by
3 posts views Thread by John Baker | last post: by
5 posts views Thread by Tim::.. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.