SQL Server | Other
Additional SQL Server features and topics not covered by specific categories
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello!
I have a column called ProductID.
Example:
('ADP[Y]2149')
('ADP[X]6433')
I have tried this query.
select * from Producttable where ProductID like 'ADP[Y]%'
But the query did not return any rows.
I need to return rows that start with ADP[Y].
Additional SQL Server features and topics not covered by specific categories
Answer accepted by question author
Hi @T L
You can try this.
select * from Producttable where ProductID like 'ADP\[Y]%' ESCAPE '\';
Best regards,
Percy Tang