I want to select all the records, which have the first letter matched
the letter 'A'.
$SQL_get_lyrics = SELECT lyric_title FROM lyrics WHERE lyric_title
LIKE \'A%\';
Some how this statement given me other record, which has the letter A
inside, too like: Know A Word and other other
There is a method using trim() but I think it's better to use RLIKE ^A.*
regards,
Jan Peuker
- Original Message -
From: Son Nguyen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 8:42 AM
Subject: SELECT the first letter MATCH in mySQL
I want to select all
This works on MsSQL:
SELECT lyric_title FROM lyrics WHERE LEFT(lyric_title,1)='A'
I want to select all the records, which have the first letter matched
the letter 'A'.
$SQL_get_lyrics = SELECT lyric_title FROM lyrics WHERE lyric_title
LIKE \'A%\';
Some how this statement given me other
: SELECT the first letter MATCH in mySQL
Importance: High
This works on MsSQL:
SELECT lyric_title FROM lyrics WHERE LEFT(lyric_title,1)='A'
I want to select all the records, which have the first letter matched
the letter 'A'.
$SQL_get_lyrics = SELECT lyric_title FROM lyrics WHERE lyric_title
LIKE
Hello Mikael,
Just add LIMIT 10 (which is equivalent to LIMIT 0,10) to show the
first 10 records,
and
LIMIT 10,10 to show 10 records starting from 10.
This issue is covered in online docs.
Regards,
Tom
Friday, April 19, 2002, 9:18:53 AM, you wrote:
MH This brings up another question to
Peuker
- Original Message -
From: Son Nguyen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 19, 2002 8:42 AM
Subject: SELECT the first letter MATCH in mySQL
I want to select all the records, which have the first letter matched
the letter 'A'.
$SQL_get_lyrics = SELECT
Hello Paul,
But RLIKE won't use indexes (even if they exist), so why RLIKE '^A' is
better than LIKE 'A%', if LIKE which starts at the beginning of the
string **will** use indexes?
Regards,
Tom
PD Regular expression patterns (unlike SQL patterns) don't need to match the
PD entire string, so
At 15:29 +0200 4/19/02, Toomas Vendelin wrote:
Hello Paul,
But RLIKE won't use indexes (even if they exist), so why RLIKE '^A' is
better than LIKE 'A%', if LIKE which starts at the beginning of the
string **will** use indexes?
I was comparing RLIKE '^A.*' to RLIKE '^A', not RLIKE to LIKE.