i'm beginner in SQL queries, When i trying to get particular records count from customer table(database), i used these queries(see below). Since, both has return the same results (display record count). What is difference between them? Which statement could be better?
select count (*) from customer_table where upper( DocumentNo ) like upper( '%12345%' )
select count(*) from customer_table where DocumentNo = '12345'
posted 3 years ago
It's not a question of which statement is better - they do different things. "upper" and "like" are standard SQL features that I'm certain are explained in any SQL manual.