Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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
 


Ïà¹ØÎĵµ£º

sql ¿ç·þÎñÆ÷ ²éѯ

--´´½¨Á´½Ó·þÎñÆ÷
exec sp_addlinkedserver   'ITSV ', ' ', 'SQLOLEDB ', 'Ô¶³Ì·þÎñÆ÷Ãû»òipµØÖ· '
exec sp_addlinkedsrvlogin 'ITSV ', 'false ',null, 'Óû§Ãû ', 'ÃÜÂë '
--²éѯʾÀý
select * from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--µ¼ÈëʾÀý
select * into ±í from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--ÒÔºó²»Ô ......

SQL SERVER 2005Ⱥ¼¯


SQL SERVER 2005µÄȺ¼¯±ØÐëÔÚʵÏÖÁËWINDOWSȺ¼¯µÄ»ù´¡ÉϲſÉÒÔ¡£
Ê×ÏÈÎÒÃÇÏÈÀ´¿´Ò»ÏÂSQL SERVER 2005Ⱥ¼¯µÄһЩÏà¹Ø½éÉÜ£º
ÔÚSQL SERVER 2005ÖÐÖ÷Òª¿ÉÒÔʹÓþµÏñºÍȺ¼¯Á½ÖÖ·½·¨À´ÊµÏָ߿ÉÓÃÐÔ£¬ÖÁÓÚÊý¾Ý¿â¾µÏñ×÷ΪSQL SERVER 2005µÄÐÂÌØÐÔÖ®Ò»£¬ÎÒÔÚÇ°ÃæµÄ²©ÎÄÒѾ­×öÁ˽éÉÜ£¬½ñÌìÎÒÃǾÍÀ´¿´Ò»ÏÂȺ¼¯µÄÅäÖ÷½·¨£ºµ±È»Ëüà ......

sql ÈÕÆÚת»»

Select  
CONVERT(varchar, getdate(), 1),--mm/dd/yy  
CONVERT(varchar, getdate(), 2),--yy.mm.dd  
CONVERT(varchar, getdate(), 3),--dd/mm/yy  
CONVERT(varchar, getdate(), 4),--dd.mm.yy  
CONVERT(varchar, getdate(), 5),--dd-mm-yy  
CONVERT(varchar, getdate(), 1 ......

sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð


sqlÖ®left join¡¢right join¡¢inner joinµÄÇø±ð
left join(×óÁª½Ó) ·µ»Ø°üÀ¨×ó±íÖеÄËùÓмǼºÍÓÒ±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
right join(ÓÒÁª½Ó) ·µ»Ø°üÀ¨ÓÒ±íÖеÄËùÓмǼºÍ×ó±íÖÐÁª½á×Ö¶ÎÏàµÈµÄ¼Ç¼
inner join(µÈÖµÁ¬½Ó) Ö»·µ»ØÁ½¸ö±íÖÐÁª½á×Ö¶ÎÏàµÈµÄÐÐ
¾ÙÀýÈçÏ£º
-------------------------------------------- ......

SQL²éѯÿËùѧУÓïÎijɼ¨×î¸ßµÄѧÉúÐÅÏ¢

Êý¾Ý¿â ÓÐÁ½Õűí
±í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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ