Select <> like

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Tue, 07 Feb 2006 7:41 am

Good morning, this is my first post, I hope to help me?
Do a select using like and <> like conditions?
I'd like to do something with these pareceido selects gone wrong ... hehe
Code: Select all
select * from uzd_crono where fone like <>'3154%'; 

select * from uzd_crono where fone <> like '3154%'; 
Thanks.
Ricardo
Location: Londrina - PR

Poston Tue, 07 Feb 2006 7:50 am

Hello Ricardo, welcome ...

Use NOT instead of <> Example:
Code: Select all
SQL> SELECT ENAME FROM EMP WHERE ENAME LIKE '%AR%';

ENAME
----------
WARD
MARTIN
CLARK

SQL> SELECT ENAME FROM EMP WHERE ENAME NOT LIKE '%AR%';

ENAME
----------
SMITH
ALLEN
JONES
BLAKE
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER

11 rows selected.

SQL>
:-
Last edited by dr_gori on Tue, 07 Feb 2006 7:57 am, edited 1 time in total.
dr_gori
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?
http://glufke.net/oracle/search.php?search_id=unanswered

Poston Tue, 07 Feb 2006 7:54 am

Man thanks a lot ... thanks
Ricardo
Location: Londrina - PR



Return to SQL

Who is online

Users browsing this forum: No registered users and 4 guests