How do you index just the first four bytes of the column?

Answers were Sorted based on User's Feedback



How do you index just the first four bytes of the column?..

Answer / amith

ALTER TABLE customers ADD INDEX (business_name(4))

Is This Answer Correct ?    2 Yes 0 No

How do you index just the first four bytes of the column?..

Answer / monika

alter table table_name add index(substr(column_name,1,4));

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

Can we rename database in mysql?

0 Answers  


What does mysql flush tables do?

0 Answers  


What are views in mysql?

0 Answers  


What is myisamchk?

0 Answers  


How to get a list of indexes of an existing table?

0 Answers  






How to set mysql variable in php?

0 Answers  


at first i'm using datediff('d', a.due_date, current_date); but it takes too long to get the result but how can i subtract the current_date - a.due_date and still get the same result like when i use datediff? thank you

1 Answers  


Is SET Command is SQL Statement..?

4 Answers   BitWise,


How do you use auto increment?

0 Answers  


write a query to mysql in safe mode and to change the root password

0 Answers  


Why mysql is used with php?

0 Answers  


Is mysql free software?

0 Answers  


Categories