Pages

Friday, August 27, 2010

MYSQL:CREATING START & STOP SERVICE ON WINDOWS (XP)

MYSQL:CREATING START & STOP SERVICE ON WINDOWS (XP)
--------------------------------------------------

installing an service
"D:\MySQL3306test\bin\mysqld" --install MYSQL3306 --defaults-file="D:\MySQL3306test\my.ini"

removing an service
"D:\MySQL3306test\bin\mysqld" --remove MYSQL3306

Cheers!!!!!

MYSQL:Display all Rows in COMMAs SEPERATED

MYSQL:Display all Rows in COMMAs SEPERATED


To display all the rows as single column by comma separated. Below is the example for your reference

mysql> select * from hi_1;
+------+--------------------+
| i | j |
+------+--------------------+
| 2 | NULL |
| 2 | dh |
| 1 | edfsdh |
| 1 | edfdsfddfsdh |
| 1 | edfdsfddfioioiisdh |
+------+--------------------+
5 rows in set (0.00 sec)

mysql> select hi_1.i,group_concat(ifnull(hi_1.j,'NA') SEPARATOR ',') from hi_1 group by i;
+------+-------------------------------------------------+
| i | group_concat(ifnull(hi_1.j,'NA') SEPARATOR ',') |
+------+-------------------------------------------------+
| 1 | edfsdh,edfdsfddfsdh,edfdsfddfioioiisdh |
| 2 | NA,dh |
+------+-------------------------------------------------+
2 rows in set (0.00 sec)

mysql>





Cheers!!!