OracleºÍSQL serverµÄÊý¾ÝÀàÐͱȽÏ
ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ
CHAR
CHAR
¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ
VARCHAR2
VARCHAR
OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö·û´®
NCHAR
NCHAR
Ç°Õß×î´ó³¤¶È2kbºóÕß×î´ó³¤¶È4kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¿É±ä³¤¶È×Ö·û´®
NVARCHAR2
NVARCHAR
¶þÕß×î´ó³¤¶È¶¼Îª4kb
ÈÕÆÚºÍʱ¼äÊý¾ÝÀàÐÍ
DATE
ÓÐDatetimeºÍSmalldatetimeÁ½ÖÖ
ÔÚoracleÀïÃæ¸ñʽΪDMYÔÚSQLSerserÀïÃæ¿ÉÒÔµ÷½Ú£¬Ä¬ÈϵÄΪMDY
Êý×ÖÀàÐÍ
NUMBER(P,S)
NUMERIC[P(,S)]
OracleÀïÃæp´ú±íСÊýµã×óÃæµÄλÊý£¬s´ú±íСÊýµãÓÒÃæµÄλÊý¡£¶øSQLServerÀïÃæp´ú±íСÊýµã×óÓÒÁ½ÃæµÄλÊýÖ®ºÍ£¬s´ú±íСÊýµãÓÒÃæµÄλÊý¡£
Êý×ÖÀàÐÍ
DECIMAL(P,S)
DECIMAL[P(,S)]
OracleÀïÃæp´ú±íСÊýµã×óÃæµÄλÊý£¬s´ú±íСÊýµãÓÒÃæµÄλÊý¡£¶øSQLServerÀïÃæp´ú±íСÊýµã×óÓÒÁ½ÃæµÄλÊýÖ®ºÍ£¬s´ú±íСÊýµãÓÒÃæµÄλÊý¡£
ÕûÊýÀàÐÍ
INTEGER
INT
ͬΪÕûÊýÀàÐÍ£¬´æ´¢´óС¶¼Îª4¸ö×Ö½Ú
¸¡µãÊýÀàÐÍ
FLOAT
FLOAT
ʵÊýÀàÐÍ
REAL
REAL
Ïà¹ØÎĵµ£º
Á¬½Ó²éѯ£¬¾ÍÊǽ«
Á½¸ö»ò¶à¸ö
±í»òÊÓͼ
ͨ¹ýÒ»¶¨µÄÌõ¼þ
½«È«²¿»ò²¿·Ý×Ö¶Î
È«²¿»ò²¿·Ý¼Ç¼
Á¬½Óµ½Ò»Æ𣬵õ½Ò»¸öеÄÊý¾Ý¼¯ºÏ¡£
È磺ÓÐÈËÔ±µµ°¸ºÍ¹¤×ʵµ°¸Á½¸ö±í£¬Á½¸ö±íÓй²Í¬µÄ¹Ø¼ü×Ö¶ÎXMDM(ÐÕÃû´úÂ룩£¬ÆäÖÐÈËÔ±µµ°¸´æ´¢ÁËÈËÊÂ×ÊÁÏ£¬¹¤×ʵµ°¸´æ´¢ÁËн³ê×ÊÁÏ¡£
Òò´Ë¿ÉÒÔͨ¹ýXMDM×ֶν«Á½¸ö±íÁ¬½ÓÆðÀ´£¬´Ó¶øʹ²éѯ½ ......
Òª´´½¨Á½¸öÎļþ
1: runBatch.bat
2: sql.txt
runBatch.bat ÄÚÈÝÈçÏ£º
sqlplus username/password @sql.txt
pause
sql.txtÄÚÈÝÈçÏ£º
spool sql.log
create table t1(cname char(20));
insert into t1(cname) values('test');
select * from t1;
spool off
exit
Ë«»÷runBatch.bat¾Í¿ÉÒÔÅúÁ¿Ö´ÐÐsql.txtÖÐ ......
Èç¹ûÄãʹÓõÄÊÇ SQL Server 2008£¬ µ±ÄãÐÞ¸ÄÊý¾Ý½á¹¹ºó£¬±£´æʱ»á±¨ÏÂͼÇé¿ö£º Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving cha ......
Ç°ÑÔ
×î½ü½ÓÁ¬Óöµ½¼¸¸öÅóÓÑÎÊÎÒͬһ¸öÎÊÌ⣬¾ÍÊǹØÓÚ.NETƽ̨ÉÏORM¿ò¼ÜµÄÑ¡Ôñ¡£ÎÒÏëÔÚÕâ¸ö½²ÇóЧÂʵÄʱ´ú£¬ËÒ²²»ÏëÊÖдSQL»ò´æ´¢¹ý³ÌÈ¥·ÃÎÊÊý¾Ý¿âÁË¡£´ó¼Ò¶¼ÖªµÀ£¬ÔÚJavaƽ̨ÉÏ£¬ORMÕâÒ»¿é»ù±¾ÊÇHibernateµÄÌìÏ¡£µ±È»£¬Ïà¶ÔÇáÁ¿¼¶µÄiBatisÒ²Óв»´íµÄ±íÏÖ¡£
&nb ......