Like '%' function with varchar2 type : Like « Select Query « Oracle PL / SQL






Like '%' function with varchar2 type

   

SQL> CREATE TABLE customers
  2  (
  3     id                NUMBER,
  4     lname         VARCHAR2(40)   CONSTRAINT           customer_lname_nn NOT NULL,
  5     main_phone_number VARCHAR2(25),
  6     credit_limit      NUMBER,
  7     email             VARCHAR2(30)
  8  );

Table created.

SQL> select lname, credit_limit
  2  from   customers
  3  where  lname like 'Q%';

no rows selected

SQL>
SQL> drop table customers;

Table dropped.

   
    
    
  








Related examples in the same category

1.A function using the LIKE operator to return a phone number's area code
2.Like with '__' (Any two characters)
3.Like with '_' and '%'
4.Use two '%' in Like statement
5.Using a NOT operator with like
6.Convert varchar value to upper case and then use like operator
7.Is Like case sensitive
8.Use % in word ending
9.Use two % signs in one like
10.Use two % signs in like
11.Like with % on both sides
12.Second letter is A
13.Create pattern dynamically and use it in like statement
14.Pattern Matching LIKE '%great%'
15.Using Pattern Matching LIKE '____ %'
16.comments like '%0\%%' escape '\'
17.Escape \
18.Description has 'SQL' substring