PL SQLÖи´ÖƳöµÄÖÐÎÄÂÒÂë
֮ǰʹÓÃPLSQL£¬¶¼ÊÇÒÔдÈëÄÚÈÝΪÖ÷£¬Ð´ÈëÖÐÎÄÄÚÈÝżÓÐÂÒÂ룬µ«ÊÇÖ»ÔÚÏÔʾÉϲ¢Î´Ó°Ïì´æÈ¡£¬ËùÒÔûÓÐÔÚÒâ¡£
½ñÌìÔÚÐÞ¸ÄÒ»¸öÊÓͼʱ£¬ÐèÒª½«ÐÞ¸ÄÄÚÈݼǼÏÂÀ´£¬so,Ïëд¸öÐ޸ļǼ£¬¾Í°ÑÊÓͼÄÚÈÝ¿½±´Á˳öÏÖ£¬·¢ÏÖ¿½±´³öÏÖµÄÖÐÎÄÄÚÈݳöÏÖÂÒÂë¡£
²¢Î´ÍêÈ«ÔÚÒ⣬ÒÔΪֻҪÔÑù·Å»Øplsql¾Í»áºÃµÄ£¬µ«ÊDZ£´æÔÙÈ¡³ö·Åµ½plsqlÖз¢ÏÖÈÔÈ»ÊÇÂÒÂë¡£¡£¡£
ËùÒԾͲé×ÊÁÏÕÒµ½Ò»¸öÁÙʱ½â¾ö·½·¨£¬·ÖÏí¸ø´ó¼Ò£º
ÔÚÊäÈë·¨ÉèÖÃÖУ¬É¾³ýÓ¢ÎĵÄÃÀʽ¼üÅÌģʽ£¬Ìí¼ÓÖÐÎļüÅÌģʽ²¢ÇÒÉèÖÃΪĬÈÏÖµ¾ÍokÁË£¡
Ïà¹ØÎĵµ£º
sqlÓïÑÔÖÐÓÐûÓÐÀàËÆCÓïÑÔÖеÄswitch caseµÄÓï¾ä£¿£¿
ûÓÐ,ÓÃcase when À´´úÌæ¾ÍÐÐÁË.
ÀýÈç,ÏÂÃæµÄÓï¾äÏÔʾÖÐÎÄÄêÔÂ
select getdate() as È ......
1.ÏÞÖÆ·µ»Ø¼Ç¼µÄÐÐÊý£¨4-10ÐУ©
select rownum,c1 from t144 where rownum<10
minus
select rownum,c1 from t144 where rownum<5
2.ÅúÁ¿²åÈë
insert into tablename(select * from othertable)
»ò
insert into (column1,column2,,,,,,,)tablename(select column1,column2,,,,,,,from othertable)
3,·Ö×éº¯Ê ......
/**
* @author ºýÍ¿¹í
* ÔÚ½¨Á¢Á¬½Ó֮ǰÐèҪһЩ׼±¸¹¤×÷£º
* ÔÚ¿ØÖÆÃæ°åÉÏͨ¹ý“¹ÜÀí¹¤¾ß”µÄ“Êý¾ÝÔ´(ODBC)”´ò¿ª“ODBCÊý¾ÝÔ´¹ÜÀíÆ÷”¶Ô»°¿ò£¬
* µ¥»÷“ϵͳDSN”Ñ¡Ï£¬È»ºóµ¥»÷“Ìí¼Ó”°´Å¥£¬µÃµ½“´´½¨Êý¾ÝÔ´”¶Ô»°¿ò£¬
......
insert into mysql.user
SELECT '%', 'admin', PASSWORD('admin'), Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv,
Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,
Index_priv, Alter_priv, Show_db_priv, Super_priv, ......