SqlServer ʵÏÖÈÕÆÚ²»Í¬¸ñʽµÄת»»£¡£¡
select
convert(char(4),auth,120)+'Äê'+
substring(convert(char(10),auth,120),6,2)+'ÔÂ'+
substring(convert(char(10),auth,120),9,2)+'ÈÕ',
convert(char(4),appr,120)+'Äê'+
substring(convert(char(10),appr,120),6,2)+'ÔÂ'+
substring(convert(char(10),appr,120),9,2)+'ÈÕ'
from a
ÒÔÉÏ´úÂëʵÏֵŦÄÜÊÇ°ÑÈÕÆÚ2008-10-10ת»»2008Äê10ÔÂ10ÈÕ
Ïà¹ØÎĵµ£º
ÏÂÃæÊÇÎÒÔÚSQLServerÖÐÓõıȽ϶àµÄº¯Êý£¬Ä㻹ÓÃЩʲôº¯Êý£¿»òÕ߶ÔÄĸöº¯ÊýÓбȽϺÃÓ÷¨£¿»òÕßÄã²»ÓÃÄÄЩº¯Êý£¿
LEFT ( character_expression , integer_expression )
·µ»Ø´Ó×Ö·û´®×ó±ß¿ªÊ¼Ö¸¶¨¸öÊýµÄ×Ö·û¡£
Àý:
select left('my name is viwo',4)
my n
RIGHT ( character_expression , integer_expression )
·µ» ......
¸ù¾Ý±í½á¹¹Éú³ÉJavaÎļþµÄ¹¤¾ß£¬ÔÚÈ¡µÃ±íµÄ×Ö¶ÎʱÈçºÎÈ¡µÃ±íµÄ¸÷ÖÖÐÅÏ¢ºÍ×¢ÊÍ£¬¾¶à·½ËÑÑ°ÕÒµ½ÈçÏÂ×ÊÁϱ¸Ó㺠oracle£º
user_tab_comments;±í×¢ÊÍ
user_col_comments;±í×Ö¶Î×¢ÊÍ
Ò ......
»·¾³£ºvs2005+sqlserver2005+PowerDesigner 12
´ò¿ªPowerDesigner 12(ÒÔϼò³Æpd)£¬Ð½¨pdm¹¤³Ì£¬ÈçͼËùʾ£º
×¢£ºdbmsÑ¡ÔñÄúÄ¿Ç°ÐèҪת»»µÄÀà±ð£¬ÎÒÓõÄÊÇsqlserver2005¡£
È»ºóÑ¡Ôñ²Ëµ¥¡¶Êý¾Ý¿â¡·¡¶ÏµÍ³DSN¡·£¬Ñ¡Ôñ»òÕßÌí¼ÓÄúÐèÒªµÄÊý¾Ý¿â£¬ÎÒÕâÀïÑ¡ÔñµÄÊÇsql server¡£ÈçͼËùʾ£º
½¨ºÃ ......
ADOÖÐsqlserver´æ´¢¹ý³ÌʹÓà ÊÕ²Ø
´ÓADOÖеõ½¶à¸ö¼Ç¼¼¯ÒÔ¼°ÔõôÑùÔÚADOÖÐʹÓÃsql server µÄ´æ´¢¹ý³Ì
DataType Value Length Data Length
BIGINT 996857543543543 15 8
INT 543543 6 4
SMALLINT 32765 5 2
TINYINT 254 3 1
BIT True 1 1
DECIMAL 765.5432321 11 9
NUMERIC 432.6544 8 5
MONEY 543.1234 ......
ÔÚSQL Server ÖвåÈëÒ»ÌõÊý¾ÝʹÓÃInsertÓï¾ä£¬µ«ÊÇÈç¹ûÏëÒªÅúÁ¿²åÈëÒ»¶ÑÊý¾ÝµÄ»°£¬Ñ»·Ê¹ÓÃInsert²»½öЧÂʵͣ¬¶øÇһᵼÖÂSQLһϵͳÐÔÄÜÎÊÌâ¡£ÏÂÃæ½éÉÜSQL ServerÖ§³ÖµÄÁ½ÖÖÅúÁ¿Êý¾Ý²åÈë·½·¨£ºBulkºÍ±íÖµ²ÎÊý(Table-Valued Parameters)¡£
ÔËÐÐÏÂÃæµÄ½Å±¾£¬½¨Á¢²âÊÔÊý¾Ý¿âºÍ±íÖµ²ÎÊý¡£
´úÂëÈçÏÂ:
--Create D ......