Home > Archive > MySQL ODBC Connector > December 2005 > set sql mode









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author set sql mode
wangxu

2005-12-28, 3:23 am

------ =_NextPart_000_011E_
01C60BC8.4315BA60
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: base64

SXQgc2hvd2luZyAiUkVB
TF9BU19GTE9BVCxQSVBF
U19BU19DT05DQVQsQU5T
SV9RVU9URVMsSUdO
T1JFX1NQQUNFLEFOU0ki
IHdoZW4gaSBzZXQgc3Fs
IG1vZGUgaXMgImFuc2ki
Lg0KDQpCdXQgbm93
IGkgd2lzaCBzcWwgbW9k
ZSBvbmx5IGluY2x1ZGUg
IlJFQUxfQVNfRkxPQVQs
UElQRVNfQVNfQ09O
Q0FUIi4NCg0KQ2FuIEkg
IGFjaGlldmUgaXQ/

------ =_NextPart_000_011E_
01C60BC8.4315BA60--

Gleb Paharenko

2005-12-28, 9:23 am

Hello.

>But now i wish sql mode only include " REAL_AS_FLOAT,PIPES_
AS_CONCAT".


Do you want this:

mysql> set @@sql_mode='REAL_AS_
FLOAT,PIPES_AS_CONCA
T';
Query OK, 0 rows affected (0.00 sec)

mysql> select @@sql_mode;
+-------------------------------+
| @@sql_mode |
+-------------------------------+
| REAL_AS_FLOAT,PIPES_
AS_CONCAT |
+-------------------------------+



>It showing
>" REAL_AS_FLOAT,PIPES_
AS_CONCAT,ANSI_QUOTE
S,IGNORE_SPACE,ANSI" when i
>set sql mode is "ansi".
>But now i wish sql mode only include " REAL_AS_FLOAT,PIPES_
AS_CONCAT".
>Can I achieve it?wangxu wrote:



--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Gleb Paharenko
/ /|_/ / // /\ \/ /_/ / /__ Gleb.Paharenko@ensita.net
/_/ /_/\_, /___/\___\_\___/ 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/mysql? unsub...sie.nctu.edu.tw

emierzwa@micron.com

2005-12-29, 9:23 am

An error is only thown during an INSERT or UPDATE statement, otherwise
you just get a warning.

- ERROR_FOR_DIVISION_B
Y_ZERO=20

Produce an error in strict mode (otherwise a warning) when we encounter
a division by zero (or MOD(X,0)) during an INSERT or UPDATE. If this
mode is not given, MySQL instead returns NULL for divisions by zero. If
used in INSERT IGNORE or UPDATE IGNORE, MySQL generates a warning for
divisions by zero, but the result of the operation is NULL.=20
=20
Ed

-----Original Message-----
From: wangxu & #91;mailto:wangxu@it
ec.com.cn]=20
Sent: Wednesday, December 28, 2005 7:23 PM
To: Gleb Paharenko; mysql@lists.mysql.com
Subject: Re: set sql mode

My sql_mode is
" STRICT_TRANS_TABLES,
ANSI_QUOTES,ERROR_FO
R_DIVISION_BY_ZERO".

But when i execute "select 1/0 from ht_detail",the result is "Null".

No error throw out.

Why?
----- Original Message -----=20
From: "Gleb Paharenko" <gleb.paharenko@ensita.net>
To: <mysql@lists.mysql.com>
Sent: Wednesday, December 28, 2005 9:26 PM
Re: set sql mode


> Hello.
>=20
>=20
> Do you want this:
>=20
> mysql> set @@sql_mode=3D'REAL_A
S_FLOAT,PIPES_AS_CON
CAT';
> Query OK, 0 rows affected (0.00 sec)
>=20
> mysql> select @@sql_mode;
> +-------------------------------+
> | @@sql_mode |
> +-------------------------------+
> | REAL_AS_FLOAT,PIPES_
AS_CONCAT |
> +-------------------------------+
>=20
>=20
>=20
>=20
>=20
> --=20
> For technical support contracts, goto

https://order.mysql.com/?ref=3Densita
> This email is sponsored by Ensita.NET http://www.ensita.net/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Gleb Paharenko
> / /|_/ / // /\ \/ /_/ / /__ Gleb.Paharenko@ensita.net
> /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET
> <___/ www.mysql.com
>=20
>=20
>=20
>=20
> --=20
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:

http://lists.mysql.com/mysql?unsub=3Dwangxu@itec.com.cn
>=20
>=20


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com