Hello.
May be you should think about the ENUM type. See: http://dev.mysql.com/doc/mysql/en/enum.html For example: create table mon(mon enum('Jan','Feb','Mar','Apr' , 'May' , 'Jun' , 'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec') , a int); insert into mon values('Jan',5); insert into mon values('Aug',3); insert into mon values('Dec',3); select * from mon order by mon asc; +------+------+ | mon | a | +------+------+ | Jan | 5 | | Aug | 3 | | Dec | 3 | +------+------+ "N. Kavithashree" <[EMAIL PROTECTED]> wrote: > > hello, > > is there any way so that months r ordered as that of calender year. > > means . i have a month field of 3 chars. like Jan, Feb, Mar etc > > when i select distinct months , the result will be displayed in the > calender year month order. > > but if i use order by mon then this order jan,feb,mar will go and it will > order accorg to the first char of the month name. > > but i want to arrnage in calender month order even when i count the stocks > for each month with group by statement. > > is there any option to sort with 2nd and 3rd char also like that of sql in > mysql ? > -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]