PL/SQLѧϰ±Ê¼ÇÒ»
ʲôÊÇPL/SQL
PL/SQL(Procedural Language/SQL,¹ý³Ì»¯SQLÓïÑÔ£©ÊÇOracle¹«Ë¾ÔÚ±ê×¼SQLÓïÑԵĻù´¡ÉÏ·¢Õ¹µÄÓïÑÔ£¬Ëü½«±äÁ¿¡¢¿ØÖƽṹ¡¢¹ý³ÌºÍº¯ÊýµÈ½á¹¹»¯³ÌÐòÉè¼ÆµÄÒªËØÒýÈëSQLÓïÑÔ£¬´Ó¶øÄܹ»±àÖƱȽϸ´ÔÓµÄSQL³ÌÐò£»ÀûÓÃPL/SQLÓïÑÔ±àдµÄ³ÌÐò³ÆΪPL/SQL³ÌÐò¿é£¬ÆäÖ÷ÒªÌصãÈçÏ£º
¾ßÓÐÄ£¿é»¯µÄ½á¹¹
ʹÓùý³Ì»¯ÓïÑÔ¿ØÖƽṹ
Äܹ»½øÐдíÎó´¦Àí
PL/SQL³ÌÐò½á¹¹
ÍêÕûµÄPL/SQL³ÌÐò½á¹¹¿ÉÒÔ·Ö³É3¸ö²¿·Ö£º
¶¨Ò岿·Ö£ºÒÔdeclareΪ±êʶ£¬ËùÓгÌÐòÖÐʹÓõij£Á¿¡¢±äÁ¿¡¢ÓαꡢÀýÍâ´¦ÀíµÈ¶¼±ØÐëÔڸò¿·Ö¶¨Òå
Ö´Ðв¿·Ö£ºÒÔbeginΪ¿ªÊ¼±êʶ£¬ÒÔendΪ½áÊø±êʶ¡£´Ë²¿·Ö±ØÐë
Òì³£´¦Àí²¿·Ö£º¸Ã²¿·Ö°üº¬ÔÚÖ´Ðв¿·ÖÀïÃ棬ÒÔexceptionΪ±êʶ
×ÜÌå½á¹¹Ï£º
declare
¶¨ÒåÓï¾ä¶Î
begin
Ö´ÐÐÓï¾ä¶Î
exception
Òì³£´¦ÀíÓï¾ä¶Î
end
Ïà¹ØÎĵµ£º
SQL Server 2005±¨ÁËÕâô¸ö´í£ºCannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "Chinese_PRC_90_CI_AS" in the like operation.
ºó²éÖ¤£¬ÕâÊÇÓÉÓÚÁ½¸ö×ö±È½ÏµÄÁеÄÅÅÐò·½Ê½²»Í¬£¬ÖÐÎÄÓкܶàÖÖÅÅÐò·½Ê½£¬¶ÔÓ¦ÈçÏ£º
ÖÐÎÄ£¨Ïã¸ÛÌرðÐÐÕþÇø£©
Chinese_Hong_Kong_Stroke_90_CI_AS
ÖÐÎÄ£¨Ïã¸ÛÌرðÐ ......
a b c&nb ......
SQL×Ô¶¯ÒìµØ±¸·Ý·½·¨
·½·¨Ò»£º
mssqlÊý¾Ý¿âÔ¶³Ì±¸·ÝµÄjob
/*ÔÚÔ¶³Ì»úÆ÷²Ù×÷ϵͳµÄ¼ÆËã»ú¹ÜÀíÀィÁ¢Ò»¸öÓû§ÃûΪkyleµÄÓû§£¬ÃÜÂëΪ1234£¬Í¬Ê±ÔÚÄÇ̨»úÆ÷µÄ·ÇϵͳÅÌÀィһ¸öÃûΪbackupµÄ¹²ÏíÎļþ¼Ð£¬ÎªÁË°²È«ÁíÍâÉèÖÃÕâ¸öÎļþ¼ÐÖ»ÓÐÕâ¸ökyleÓû§¿ÉÒÔ·ÃÎÊ¡£*/
declare @sql varchar(500)
select @sql='\\10.2. ......
´ËΪתÌù£¬µ«ÊÇ´ÓÁ¬¸öÌû×ÓÖÐÊÕ¼¯¶øÀ´
ÏÂÃæÀ´Ò»Æð¿´¿´ÂÛ̳ÀïµÄÒ»¸öoracle·½ÃæµÄÎÊÌ⣺
====================Question
=========================
jmbdat dayt y &n ......
°ÑOldÊý¾Ý¿â¸ÄΪNewÊý¾Ý¿â
1.´ò¿ª“ÆóÒµ¹ÜÀíÆ÷”ÕÒµ½ OldÊý¾Ý¿â££¡·ÓÒ¼ü££¡·ËùÓÐÈÎÎñ££¡··ÖÀëÊý¾Ý¿â
2.µ½C:\Program Files\Microsoft SQL Server\MSSQL\DataÏÂÕÒµ½Old_Data.mdfºÍOld_log.ldf°ÑOld_Data»»³ÉÄãÏëÒªµÄÃû×ÖÀýÈçNew.mdf¡¢New.ldf
3.µ½ÆóÒµ¹ÜÀíÆ÷£¬ÕÒµ½ Êý¾Ý¿â ££¡·ÓÒ¼ü££¡·ËùÓÐÈÎÎñ££¡ ......