问题描述:
使用select xh from A查出这张表中的所有记录
其中有一条记录
我想查看他的详细信息:
假设它的xh为10000000
而使用:
select * from A where xh like '10000000%';
结果却是没有任何记录这是什么原因呢?
使用select xh from A查出这张表中的所有记录
其中有一条记录
我想查看他的详细信息:
假设它的xh为10000000
而使用:
select * from A where xh like '10000000%';
结果却是没有任何记录这是什么原因呢?
tony@ORCL1> select empno,ename from emp; EMPNO ENAME
---------- ----------
7369 SMITH
7499 ALLEN
7521 WARD
7566 JONES
7654 MARTIN
7698 BLAKE
7782 CLARK
7788 SCOTT
7839 KING
7844 TURNER
7876 ADAMS
7900 JAMES
7902 FORD
7934 MILLER14 rows selected.tony@ORCL1> select empno,ename from emp where empno like '7369%'; EMPNO ENAME
---------- ----------
7369 SMITH仔细看看xh?是不是多写了个0?
或者select * from A where xh=10000000;看看结果呢?
SQL> create table A(
2 xh varchar2 (20)
3 );表已创建。SQL> insert into A values(' 10000000');已创建 1 行。SQL> select * from A where xh like '10000000%';未选定行SQL> select * from A where xh like ' 10000000%';XH
----------------------------------------
10000000