Comments - Getting Started with Indexes

1 year, 5 months ago Jibun no Kage

How do you return the index for a given row? Select * From t1, returns the primary key index, but Select Index From t1 does not work? Even though Select * From t1 shows the primary key as 'Index', how can one get the index returned as part of a select query without using *?

 
1 year, 5 months ago Ian Gilfillan

I'm not clear what you're asking. An index is used for looking up rows. SELECT * ... returns all the fields, not the index. If you clarify with your table structure and sample data, giving your desired results, it may be easier to help.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.