/ ITC Help System
/ Site map
/ NM Tech homepage
Searching multiple Sybase tables
If you want to search for items in multiple tables (for
instance, all the Johns in a rolodex table and in a masons table)
this is the way to do it.
At the end of each command press the space-bar or press enter
before continuing the next step.
- 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 first table you are searching, then
type a comma and the name of the second table. If you have more
tables you want to search, add them by typing a comma, then the
table name. There is no limit to the number of tables you can
- Type the name of the column you are searching.
- Type the word(s) you the first item you are searching for,
including any wildcards you need.
- Type the word(s) of the item you are searching for,
including any wildcards you need (see
`Sybase searches when you know part of the data').
- Press Enter.
If there is a value that matches your search, you see the
results from your search and
(1 row affected)
The number may be 2 or 3, or whatever if your search matches more
than one row.
For example, to find all the Johns in Seattle in a table
called rolodex and return all the columns, type
select * from rolodex where name likeJohn%
and city=Seattle go
See also: Searching Sybase databases
Previous: Sybase: computing values from search results
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 00:32:52 UT