mysql>Select (20+5)*4;
mysql>Select (20+5)*4,sin(pi()/3);
mysql>Select (20+5)*4 AS Result,sin(pi()/3); (AS: 指定假名为Result)
<B>5、多行语句</B>
一条命令可以分成多行输入,直到出现分号“;”为止:
<ccid_nobr>
<table width="400" border="1" cellspacing="0" cellpadding="2"
bordercolorlight = "black" bordercolordark = "#FFFFFF" align="center">
<tr>
<td bgcolor="e6e6e6" class="code" style="font-size:9pt">
<pre><ccid_code> mysql> select
-> USER()
-> ,
-> now()
->;
+--------------------+---------------------+
| USER() | now() |
+--------------------+---------------------+
| ODBC@localhost | 2001-05-17 22:59:15 |
+--------------------+---------------------+
1 row in set (0.06 sec)
mysql> |