Kiran Paul VJ
asked on
clear screen in mysql command prompt
hi experts,
is there anyway to clear the screen in mysql command line prompt. Like CLS in windows command prompt
I am using version 5.
thanx in advance
kiranvj
is there anyway to clear the screen in mysql command line prompt. Like CLS in windows command prompt
I am using version 5.
thanx in advance
kiranvj
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
increasing points
ASKER
hi pradapkumar,
which is the link
kiranvj
which is the link
kiranvj
the above link documents all facilities available with client utility programs.
why? whether that link works or not? in my system it works correctly.
In that link Chapter 8.5 explains the command line client's usage. Click on that link and read it.
why? whether that link works or not? in my system it works correctly.
In that link Chapter 8.5 explains the command line client's usage. Click on that link and read it.
If you are in unix, just run:
mysql> system clear
From DOS (or windows), just run
mysql> system cls
mysql> system clear
From DOS (or windows), just run
mysql> system cls
Hi Nova i run ur suggestion
but it gives following error.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'syste
m cls' at line 1
but it gives following error.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'syste
m cls' at line 1
Just checked http://dev.mysql.com/doc/refman/5.0/en/mysql-commands.html and it says that the system command runs only in unix. That is silly.
You might be able to make mysql print a clear-screen escape sequence with
SELECT 0x1B080C\G
This ought to make mysql output a ESC BS ^L sequence which used to make the screen clear in old versions of dos. I don't know if it works nowadays. See http://www.modsoft.com/piclan/man/pl-12.htm
You can get the ANSI escape sequence to clear screen with this:
SELECT CONCAT(0x1B, '[2J')\G
See http://en.wikipedia.org/wiki/ANSI_escape_code
The \G prevents mysql from writing all that ascii grid around the result.
You might be able to make mysql print a clear-screen escape sequence with
SELECT 0x1B080C\G
This ought to make mysql output a ESC BS ^L sequence which used to make the screen clear in old versions of dos. I don't know if it works nowadays. See http://www.modsoft.com/piclan/man/pl-12.htm
You can get the ANSI escape sequence to clear screen with this:
SELECT CONCAT(0x1B, '[2J')\G
See http://en.wikipedia.org/wiki/ANSI_escape_code
The \G prevents mysql from writing all that ascii grid around the result.
ASKER
hi pradapkumar,
i checked ur link,like you said there is no command to clear the screen.
hi NovaDenizen ,
i checked the links in ur last post, but none could slove my problem.
so i assume that there is no command in MySQL 5 to clear the contents of the screen and lets hope it will be incorporated in future versions.
thank u all for ur help.
and if there are no new inputs to this thread for next two or three days, i will be accepting the answers.
kiranvj
Did you try my two SELECT commands? Did either work?
ASKER
hi NovaDenizen,
i tried both none worked,
mysql>select 0x1B080C\G
***********************1. row*********************** *
0x1B080C:some ascii characters
1 row in set(0.00 sec)
mysql>SELECT CONCAT(0x1B, '[2J')\G
+------------------------- ---------- +
| concat(0x1B.'[2J') |
+------------------------- ---------- +
| <2J |
+------------------------- ---------- +
1 row in set (0.00 sec)
i tried both none worked,
mysql>select 0x1B080C\G
***********************1. row***********************
0x1B080C:some ascii characters
1 row in set(0.00 sec)
mysql>SELECT CONCAT(0x1B, '[2J')\G
+-------------------------
| concat(0x1B.'[2J') |
+-------------------------
| <2J |
+-------------------------
1 row in set (0.00 sec)
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
no probs, i think there is no feature like that.
search your documentation for a command that gets you to the system, like NovaDenizen suggested the "system" command. maybe on windows its named "host" orso... search for something like that and when you found it, you can then use any console command, like "cls". please wait until 20:00 CET so i can check that myself at home, im pretty sure theres something to do that...
ASKER
>>please wait until 20:00 CET so i can check that myself at home, im pretty sure theres something to do that...
sure
sure
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hi,
So three experts have said that its not possible, so what am i waiting for......
I am increasing the points and splitting 75(currently assigned) + 75 + 75
kiranvj
So three experts have said that its not possible, so what am i waiting for......
I am increasing the points and splitting 75(currently assigned) + 75 + 75
kiranvj
ASKER
oops, forgot to say thank u...
thank you friends, all your comment were really informative. i will be asking more ques abt mysql.... so cu soon.
bye
kiranvj
ASKER
thank for your reply, do u know any reference in the Mysql site about the above problem.
kiranvj