<pre><font size=3>
如是你用的是paradox表,可用:
SELECT * from person where SUBSTRING(name FROM 1 for 2)='张'
找出姓张的人
具体说明:
Extracts a substring from a string.
SUBSTRING(column_reference FROM start_index [FOR length])
Description
Use SUBSTRING to extract a substring from a table column or character literal, specified
in the column reference.
FROM is the character position at which the extracted substring starts within the
original string. The index for FROM is based on the first character in the source value
being 1.
FOR is optional, and specifies the length of the extracted substring. If FOR is omitted,
the substring goes from the position specified by FROM to the end of the string.
The example below, applied to the literal string &quot;ABCDE&quot;
returns the value &quot;BCD&quot;.
SELECT SUBSTRING(&quot;ABCDE&quot;
FROM 2 FOR 3) AS Sub
FROM country
In the SELECT statement below only the second and subsequent characters of the NAME
column are retrieved.
SELECT SUBSTRING(name FROM 2)
FROM country
When applied to retrieved data of a SELECT statement, the effect is transient anddo
es
not affect stored data. When applied to the update atoms of an UPDATE statement, the
effect is persistent and permanently converts the case of the stored values.
</font></pre>