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

³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»

Ô­ÎÄ£ºÁõÎä| ³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»
ÊìϤORACLE¹ÜÀíµÄÒ»¶¨¶ÔÕâЩÃüÁî²»»áÄ°Éú£¬²»¹ý¶ÔÓÚÎÒÕâ¸ö¸Õ½Ó´¥ORACLE¹ÜÀíµÄÀ´Ëµ£¬»¹ÊÇÓбØÒª×öϼǼ£¬ÒÔ±ãËæʱ²é¿´¡£
Ò» µÇ¼SQLPLUS
sqlplus Óû§Ãû/ÃÜÂë@Êý¾Ý¿âʵÀý as µÇ¼½ÇÉ«;
Èç:Óû§sys(ÃÜÂëΪ123)ÒÔsysdbaµÄ½ÇÉ«µÇ¼Êý¾Ý¿âORACL£¬ÎÒÃÇ¿ÉÒÔÊäÈ룺sqlplus sys/123@oracl as sysdba;
ÕâÖֵǼ·½Ê½»áÖ±½Ó±©Â¶ÃÜÂ룬Èç¹ûÏëÒþ²ØÃÜÂ룬¿ÉÒÔÔÚ´ËÊ¡ÂÔÃÜÂëµÄÊäÈ룬È磺sqlplus sys@oracl as sysdba;»Ø³µÒÔºóORACLE»á¸ø³öÊäÈëÃÜÂëµÄÌáʾ·û¡£
µÇ¼ÒÔºóÈç¹ûÏëÇл»ÆäËûµÄÓû§£¬¿ÉÒÔÖ±½ÓʹÓÃconnect ÃüÁî,È磺connect user2/password@oracl as sysdba,ͬÉÏÒ»Ñù£¬¿ÉÒÔ½«ÃÜÂë·Ö¿ªÊäÈë¡£
¶þ Í˳öSQLPLUS
quit£»
Èý ´´½¨Óû§
create user Óû§Ãû identified by ÃÜÂë;
È磺´´½¨Óû§CKSP£¬ÃÜÂëΪ123: create user cksp identified by 123;
ËÄ ¸øÓû§·ÖÅä½ÇÉ«»òȨÏÞ
grant *** to ***;
È磺¸ø¸Õ²ÅµÄÓû§·ÖÅä½ÇÉ«DBA:grant dba to cksp;
·ÖÅäcreate table ȨÏÞ£ºgrant
Îå ɾ³ýÓû§
drop user Óû§ [cascade];
ÆäÖÐcascadeÊÇ¿ÉÑ¡µÄ£¬Èç¹ûÊäÈëÁË£¬Ôò±íʾɾ³ý¸ÃÓû§¼°ËùÓÐÊý¾Ý¡£
È磺ɾ³ýÉÏÃæ´´½¨µÄÓû§CKSP¼°ËûµÄËùÓÐÊý¾Ý£ºdrop user cksp cascade;


Ïà¹ØÎĵµ£º

sqlÊÂÎñ´¦Àí


 
BEGIN TRANSACTION--¿ªÊ¼ÊÂÎñ
DECLARE @errorSun INT --¶¨Òå´íÎó¼ÆÊýÆ÷
SET @errorSun=0 --û´íΪ0
UPDATE a SET id=232 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
UPDATE aa SET id=2 WHERE a=1 --ÊÂÎñ²Ù×÷SQLÓï¾ä
SET @errorSun=@errorSun+@@ERROR --ÀÛ¼ÆÊÇ·ñÓдí
I ......

sql server ÖеÄһЩʵÓõÄsqlÓï¾ä

¼ò½é
ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÁоÙһЩsqlÓï¾äÀ´½éÉÜÊý¾Ý¿â£¬Êý¾Ý±í£¬ÊÓͼµÈµÈ¡£µ±ÎÒÃÇÔÚʹÓòéѯ²éѯ²Ù×÷ʱÕâЩsqlÓï¾ä¶¼ÊǷdz£ÓÐÓõġ£ËäÈ»ÔÚsql server¶ÔÏóä¯ÀÀÆ÷ÖÐÎÒÃÇÒ²¿ÉÒÔ»ñµÃÕâЩÓï¾ä£¬µ«ÊÇÈç¹ûÎÒÃÇдÕâЩÓï¾äʱÎÒÃÇ¿ÉÒÔ½«Ëü×Ô¶¨Òå¡£Õâ¾ÍÒâζ×ÅÎÒÃÇ¿ÉÒÔ¸øÓè×Ô¼ºµÄÐèÇóÀ´¹ýÂ˽á¹û¡£
sqlÓï¾äÁбí
ÈçºÎÁоÙsql serverµ±Ç°Á ......

ORACLE³£ÓÃSQL

Ò».ORACLE³£Óñí
1.dual     ORACLEÓÃÀ´¸øûÓбíµÄÔËËã·û.Èç:select sysdate from dual;
¶þ.×Ö·û´®²Ù×÷
1.||  ×Ö·û´®¼Ó·¨  select 'a'||'bc' from dual;      --'abc'
Èý.ʱ¼äºÍÈÕÆÚ
1.sysdate     ϵͳµ±Ç°µÄÈÕÆÚ
   &n ......

ORACLEºÍSQLÓï·¨Çø±ð¹éÄÉ

¹Ø¼ü×Ö: oracle & sql server
Êý¾ÝÀàÐͱȽÏ
ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ CHAR CHAR ¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ VARCHAR2 VARCHAR OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö· ......

SQL Server 2008ÖеÄ9ÖÖÊý¾ÝÍÚ¾òËã·¨


ÕªÒª£ºSQL Server 2008ÖÐÌṩÁË9ÖÖ³£ÓõÄÊý¾ÝÍÚ¾òËã·¨£¬ÕâЩËã·¨ÓÃÔÚ²»Í¬Êý¾ÝÍÚ¾òµÄÓ¦Óó¡¾°Ï£¬±¾Îľ͸÷¸öËã·¨Öð¸ö·ÖÎöÌÖÂÛ¡£
±êÇ©£ºÊý¾ÝÍÚ¾òËã·¨  SQL Server 2008
1.¾ö²ßÊ÷Ëã·¨
¾ö²ßÊ÷£¬ÓÖ³ÆÅж¨Ê÷£¬ÊÇÒ»ÖÖÀàËƶþ²æÊ÷»ò¶à²æÊ÷µÄÊ÷½á¹¹¡£¾ö²ßÊ÷ÊÇÓÃÑù±¾µÄÊôÐÔ×÷Ϊ½áµã£¬ÓÃÊôÐÔµÄÈ¡Öµ×÷Ϊ·ÖÖ§£¬Ò²¾ÍÊÇÀàËÆÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ