Is there a way to add a key number in the SQL key group ? Arbitrary (code, NAME) Suppose a table with tuples Example table: The desired projection to use CODE as grouping attribute: thanks MySQL does not do AFAIK. The most included in the base.
Code name ---- ---- A Apple a Angel A Arizona B Bravo C. Charlie C Cat de Dog de Doppler D Data D Below
code C_NO NAME -------- ---- A1 Apple A1 Angel A2 Arizona B B Bravo C 1 Charlie C. Cat D. Dog D1 Data D2 Down D3 Doppler
Selection code, ROW_NUMBER () (name by order by order) - 1 as C_NO, name from MyTable < / Div>
Comments
Post a Comment