MySQL Ñϸñģʽ sql_mode
ËäȻ˵ÎÒÃǾ¡Á¿ÔÚд³ÌÐòµÄʱºò¿ØÖƲåÈëµ½Êý¾Ý¿âµÄÊý¾Ý£¬¶ø²»ÒªÓÃÊý¾Ý¿âÈ¥ÅжÏÊý¾ÝµÄ¶Ô´í£¬µ«ÊÇÓÐʱºòΪÁË·½±ã»¹ÊÇÐèÒªÊý¾Ý¿â×ÔÉíµÄÈÝ´íÄÜÁ¦À´°ïÖúÎÒÃǴﵽĿµÄµÄ¡£¾ÙÀý˵Ã÷£º
´´½¨ÈçÏÂÊý¾Ý±í
CREATE TABLE `book` (
`id` int(11) default NULL,
`num` int(11) unsigned default NULL
) ENGINE=InnoDB DEFAULT CHARSET=gbk
insert into bookvalues(1,0),(2,0)
Ö´ÐÐupdate book set num='abc'£¬¾¹È»²»±¨´í£¬ÔÒòÊÇûÓÐÆôÓÃÑϸñģʽ¡£ËùÒÔ
ÏÈÖ´ÐÐset sql_mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION",
È»ºóÖ´ÐÐupdate book set num='abc'£¬Êý¾Ý¿â¾Í±¨´íÁË
Èç¹ûÏëÒ»ÀÍÓÀÒÝ£¬ÄǾÍÖ±½Ó°ÑÊý¾Ý¿âÅäÖÃÎļþmy.iniÖеÄÏà¹Ø²ÎÊýÉèÖÃΪ
# Set the SQL mode to strict
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Ïà¹ØÎĵµ£º
mysqlµ¼³ösql½Å±¾ ÊÕ²Ø
×¢ÒâÊÂÏî:
*±ØÐëÔÚD:\LTSOFT\MYSQL4\bin> mysqldump -u root -p test > c:\a.sql
ÏȵýøÈëmysql°²×°Ä¿Â¼µÄbinÏ£¨¿ÉÒÔ¿´µ½ÀïÃæÓÐmysqldump.exe£©£¬Í¨³£mysqlĬÈÏ°²×°ÔÚC:\Program Files\MySQL\MySQL Server 5.0
* ²»ÄܽøÈëmysql ÃüÁîÀï.
MySQLµ¼³ ......
create PROCEDURE [dbo].[P_PageTest]
@SQL Nvarchar(max), --SQLÓï¾ä²»°üÀ¨ÅÅÐò
@CurPage int, --µ±Ç°Ò³
@PageRows int, --Ò³Ãæ³ß´ç
@Order Nvarchar(20), --ÅÅÐò×Ö¶Î
@OrderType Nvarchar( ......
±äÁ¿ÉùÃ÷
Syntax:
identifier [CONSTANT] datatype [NOT NULL] [:= | DEFAULT expr];
SQL> declare
2 a date;
3 b number(20) not null :=100;
4 c varchar2(10);
5 d constant number(20) default 1000;
6 begin
7 null;
8 end;
9 /
PL/SQL procedure successful ......
1.PRIMARY KEY£¨Ö÷¼üË÷Òý£©
mysql>ALTER TABLE `table_name` ADD PRIMARY KEY ( `column` )
2.UNIQUE(ΨһË÷Òý)
mysql>ALTER TABLE `table_name` ADD UNIQUE (
`column`
)
3.INDEX(ÆÕͨË÷Òý)
mysql>ALTER TABLE `table_name` ADD INDEX index_name ( `column` )
4.FULLTEX ......
ÎÒÃÇÒª×öµ½²»µ«»áдSQL£¬»¹Òª×öµ½Ð´³öÐÔÄÜÓÅÁ¼µÄSQLÓï¾ä¡£
¡¡¡¡
¡¡¡¡£¨1£©Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
¡¡¡¡
¡¡¡¡OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ ......