Are there any differences between following two indexes?
If there are any, what are the difference
A multi-column index is conceptually no different than taking all the columns fields and concatinating them together -- indexing the result as a single field.
Since indexes are b-trees they are always searched left to right. You have to begin your search from the left to pair down results as you move to the right for the index to do its job and provide useful results.
With only a single field indexed:
WHERE val1 LIKE 'myvalue%' (uses index)
WHERE val1 LIKE '%myvalue' (cannot use index)
The same concept is applied for multi-column indexes:
When order is val1,val2
WHERE val1='value1' (uses index)
WHERE val2='value2' (cannot use index)
When order is val2,val1
WHERE val1='value1' (cannot use index)
WHERE val2='value2' (uses index)
If both fields are matched exactly order of indexes does not matter in that case.
WHERE val1='value1' AND val2='value2' (uses index in any order)