/ ITC Help System
/ Site map
/ NM Tech homepage
Sybase searches when you know part of the data
A wildcard search is what you want when you know some of the
data you are looking for and you know which column and table it
is in. A wildcard is a character that matches any character, or
any string of characters.
At the end of each command press the space-bar or press enter
before continuing the next step.
- To do a wildcard search, type
- Type the name of the columns you displayed after the search.
Separate each column name with a comma.
For instance, if you are searching for John Jones and you
want to know his phone number and his address, so you would type
- If you want every column to be returned, type an asterisk.
- Type the name of the table you are searching.
- Type the name of the column you are searching.
- Type the information you know, mixed with wildcards.
A wildcard is a character that matches any character, or any string of
characters. In Sybase, the wildcard to match an single character
is _ and the wildcard character that will match one or more
characters is %.
So, if you are looking for John, but you cant remember his name, you
If you are looking for John Johnson, whose last name might be spelled
Johnsen, you would type
Wildcard characters can return all kinds of unsuspected results.
John% would also return Johnathan, Johnnsonn, and
- Press Enter.
If there is a value that matches your search, you see the
results from your search and
The number may be 2 or 3, or larger if your search matches more than one
(1 row affected)
For example, to find everyone whose name starts with John in a table
called rolodex and return all the columns, type
select * from rolodex where name like John%
Next: Sybase searches for multiple columns
See also: Searching Sybase databases
Previous: Simple search in Sybase
to help pages
New Mexico Tech Information Technology and Communications: Help System
To report a problem: File a ticket
Send mail to the User consultant
on duty or call them at 575-835-5437
About New Mexico Tech
Maintained by John Shipman, email@example.com;
original by Steve Anderson
Last updated: 1997/06/25 20:19:00 UT