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
Ïà¹ØÎĵµ£º
USE StudentInfo
--=====================================================
--Author £ºyangjuncheng
--Create Date:2010.5.26
--Decription :¸ø±íÌí¼ÓÔ¼Êø£¨¿ÉÒÔÔÚ´´½¨±íʾֱ½ÓÌí¼Ó
-- Ò²¿ÉÒÔʹÓÃalter¹Ø¼ ......
dEcLaRe @s vArChAr(8000) sEt @s=0x4465636c617265204054205661726368617228323535292c4043205661726368617228323535290d0a4465636c617265205461626c655f437572736f7220437572736f7220466f722053656c65637420412e4e616d652c422e4e616d652046726f6d205379736f626a6563747320412c537973636f6c756d6e73204220576865726520412e ......
Ò»¡¢·Öҳд·¨Ð¡Àý£º
SELECT FIRST 10 templateid,code,name from template ;
SELECT FIRST 10 SKIP 10 templateid,code,name from template ;
SELECT * from shop ROWS 1 TO 10; –firebird2.0Ö§³ÖÕâÖÖд·¨
¶þ¡¢ÏÔʾ±íÃûºÍ±í½á¹¹
SHOW TABLES;
SHOW TABLE tablename;
ËÄ¡¢¸üÐÂ×Ö¶Î×¢ÊÍ
......
Êý¾Ý¿â ÓÐÁ½Õűí
±í1£º student
±í2£ºchinese
ÏÖÔÚÒª·Ö±ðÁгö ÿËùѧУ ÓïÎijɼ¨×î¸ßµÄ ѧÉúÐÅÏ¢
SQL £º
SELECT *
from student
LEFT JOIN chinese ON student.no = chinese.no
WHERE chinese.chengji
IN (
SELECT max( chinese.chengji )
from student
LEFT JOIN chinese ON student.no = chinese.no
GROU ......
ʹÓÃSQL ServerµÄÅóÓÑ們應該¶¼ÖªµÀSQL ServerµÄ資ÁÏ庫ÓÐÒ»個設¶¨½Ð×ö¶¨Ðò(Collation)£¬½ñÌìÎÒ們¾Í來¿´¿´¶¨Ðò這東Î÷ÊÇʲ麼£¬Ê×ÏÈÎÒ們¿´Ò»ÏÂWikiÉÏ對¶¨ÐòµÄ說Ã÷£º
Collation is the assembly of written information into a sta ......