MySQL Forums
Forum List  »  General

Can't select without wildcard
Posted by: Omar Syed
Date: May 05, 2009 11:05AM

I recently installed mysql on a CentOS box using yum. I can insert rows,
but can't seem to select them without using a wildcard.

====

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.0.45 Source distribution

mysql> insert into _session (session, idle, active) values ('abc', 123, 0);
Query OK, 1 row affected (0.00 sec)

mysql> select * from _session where session='abc';
Empty set (0.00 sec)

mysql> select * from _session where session like 'abc';
Empty set (0.00 sec)

mysql> select * from _session where session like 'abc%';
+---------+----------+-------+------------+--------+--------+----------+---------+
| session | username | realm | idle | active | wanted | postdate | message |
+---------+----------+-------+------------+--------+--------+----------+---------+
| abc | NULL | NULL | 0000000123 | 0 | NULL | NULL | NULL |
+---------+----------+-------+------------+--------+--------+----------+---------+
1 row in set (0.00 sec)

====

Any idea why I can't select the row without using a wildcard?

Omar

Options: ReplyQuote


Subject
Written By
Posted
Can't select without wildcard
May 05, 2009 11:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.