Search code examples
sqloracleoracle11goracle-sqldeveloper

How to select tables with specific degree from user_tables


select * from user_tables where degree = '1';

this is giving null but when we do

select * from user_tables 

then it does show tables with 1 degree


Solution

  • I have faced a similar issue few years back, Degree column is varchar2(10) and hence you should use below query

    SELECT * FROM USER_TABLES WHERE TRIM(DEGREE) = '6';