STARTING is not a stand-alone command; it appears inside larger statements in several SQL dialects. The two most common contexts are:1. Prefix comparison (Firebird and InterBase) SELECT … WHERE STARTING WITH performs a case-sensitive, index-friendly prefix search. It behaves like LIKE '%' but without wildcard processing after the prefix, making the operation faster and predictable. Collation rules apply, and an index on the searched column can be used if the literal does not begin with a wildcard.2. File import (MySQL and MariaDB) In LOAD DATA [LOCAL] INFILE, the LINES STARTING BY 'prefix' clause tells the server to treat only the part of each line after the specified prefix as actual data. Lines missing the prefix are skipped. This is useful when the source file embeds markers or comments at the start of each record.Because STARTING is embedded in larger statements, it inherits their transactional behavior and error handling. It is reserved in dialects that implement one of the above features, so avoid using it as an unquoted identifier.
Prefix string
(literal or parameter) - The characters that must appear at the start of the compared column or source line.InterBase 6.0 (STARTING WITH), MySQL 4.1 (LINES STARTING BY)
STARTING WITH compares a column to a literal and returns rows where the column begins with that literal. It is faster than LIKE because it avoids wildcard evaluation after the prefix.
Use LINES STARTING BY 'prefix' inside LOAD DATA INFILE. MySQL discards the prefix and parses the remaining part of each line.
Yes. If the literal is constant and does not start with a wildcard, the database can use an index on the searched column for rapid lookup.
No. It is reserved only in dialects that implement STARTING WITH or LINES STARTING BY. In others, it can be used as an identifier, but quoting is recommended for portability.