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

SQL*PLUSÃüÁîµÄʹÓôóÈ«(ת)

OracleµÄsql*plusÊÇÓëoracle½øÐн»»¥µÄ¿Í»§¶Ë¹¤¾ß¡£ÔÚsql*plusÖУ¬¿ÉÒÔÔËÐÐsql*plusÃüÁîÓësqlÓï¾ä¡£
ÎÒÃÇͨ³£Ëù˵µÄDML¡¢DDL¡¢DCLÓï¾ä¶¼ÊÇsqlÓï¾ä£¬ËüÃÇÖ´ÐÐÍêºó£¬¶¼¿ÉÒÔ±£´æÔÚÒ»¸ö±»³ÆΪsql bufferµÄÄÚ´æÇøÓòÖУ¬²¢ÇÒÖ»Äܱ£´æÒ»Ìõ×î½üÖ´ÐеÄsqlÓï¾ä£¬ÎÒÃÇ¿ÉÒÔ¶Ô±£´æÔÚsql bufferÖеÄsql Óï¾ä½øÐÐÐ޸ģ¬È»ºóÔÙ´ÎÖ´ÐС£
³ýÁËsqlÓï¾ä£¬ÔÚsql*plusÖÐÖ´ÐеÄÆäËüÓï¾äÎÒÃdzÆ֮Ϊsql*plusÃüÁî¡£ËüÃÇÖ´ÐÐÍêºó£¬²»±£´æÔÚsql bufferµÄÄÚ´æÇøÓòÖУ¬ËüÃÇÒ»°ãÓÃÀ´¶ÔÊä³öµÄ½á¹û½øÐиñʽ»¯ÏÔʾ£¬ÒÔ±ãÓÚÖÆ×÷±¨±í¡£
ÏÂÃæ¾Í½éÉÜÒ»ÏÂһЩ³£ÓõÄsql*plusÃüÁî¡£
1.    Ö´ÐÐÒ»¸öSQL½Å±¾Îļþ
SQL>start file_name
SQL>@ file_name
ÎÒÃÇ¿ÉÒÔ½«¶àÌõsqlÓï¾ä±£´æÔÚÒ»¸öÎı¾ÎļþÖУ¬ÕâÑùµ±ÒªÖ´ÐÐÕâ¸öÎļþÖеÄËùÓеÄsqlÓï¾äʱ£¬ÓÃÉÏÃæµÄÈÎÒ»ÃüÁî¼´¿É£¬ÕâÀàËÆÓÚdosÖеÄÅú´¦Àí¡£
2.    ¶Ôµ±Ç°µÄÊäÈë½øÐб༭
SQL>edit »ò ed
3.    ÖØÐÂÔËÐÐÉÏÒ»´ÎÔËÐеÄsqlÓï¾ä
SQL>/ »òrun
4.    ½«ÏÔʾµÄÄÚÈÝÊä³öµ½Ö¸¶¨Îļþ
SQL> SPOOL file_name
ÔÚÆÁÄ»ÉϵÄËùÓÐÄÚÈݶ¼°üº¬ÔÚ¸ÃÎļþÖУ¬°üÀ¨ÄãÊäÈëµÄsqlÓï¾ä¡£
5.    ¹Ø±ÕspoolÊä³ö
SQL> SPOOL OFF
Ö»ÓйرÕspoolÊä³ö£¬²Å»áÔÚÊä³öÎļþÖп´µ½Êä³öµÄÄÚÈÝ¡£
6.    ÏÔʾһ¸ö±íµÄ½á¹¹
SQL> desc table_name
7.    COLÃüÁî
Ö÷Òª¸ñʽ»¯ÁеÄÏÔʾÐÎʽ¡£
¸ÃÃüÁîÓÐÐí¶àÑ¡Ï¾ßÌåÈçÏ£º
COL[UMN] [{ column|expr} [ option ...]]
OptionÑ¡Ïî¿ÉÒÔÊÇÈçϵÄ×Ó¾ä:
ALI[AS] alias
CLE[AR]
FOLD_A[FTER]
FOLD_B[EFORE]
FOR[MAT] format
HEA[DING] text
JUS[TIFY] {L[EFT]|C[ENTER]|C[ENTRE]|R[IGHT]}
LIKE { expr|alias}
NEWL[INE]
NEW_V[ALUE] variable
NOPRI[NT]|PRI[NT]
NUL[L] text
OLD_V[ALUE] variable
ON|OFF
WRA[PPED]|WOR[D_WRAPPED]|TRU[NCATED]
1). ¸Ä±äȱʡµÄÁбêÌâ
COLUMN column_name HEADING column_heading
Àý£º
SQL>select * from dept;
DEPTNO      DNAME                      LOC
---------- ---------------------------- ---------
10          ACCOUNTING &nbs


Ïà¹ØÎĵµ£º

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

SQL SERVER 2008 EXPRESS°æ±¾Ô¶³ÌÁ¬½Ó(tcp/ip)

´ËÎÊÌâÕÛÌÚ°ëÌì,googleÒ²ËÑË÷ÁË,ÍøÉϺܶàÅóÓÑÒ»°ã×öµ½µÚ¶þ²½²»³É¹¦,ÎÒÒ²²îµã·ÅÆúÁË.×îºóͨ¹ýµÚÈý²½Á¬½Ó³É¹¦ÁË.
1.·À»ðǽÔÊÐí1433
2.ÅäÖù¤¾ßÀïµÄSQL Server ÅäÖùÜÀíÆ÷.´ò¿ªºó,¿ªÆôÓÒ±ßÈý¸öЭÒé.²¢¶Ôtcp/ipÈçÏÂÅäÖÃ
 
3.ÍøÉϴ󲿷Ö×öµ½µÚ¶þ°æÖØÆôsql server·þÎñ,ÈÔÈ»ÎÞЧ.Æäʵ,ÐèÒªÐÞ¸ÄÁ¬½Ó×Ö·û´®.Ö¸¶¨ÎÒÃÇÅäÖõĶ ......

SqlÊý¾Ý¿âÖØÃüÃû

1.²éѯ³öµ±Ç°Á¬½ÓÈ»ºó½«Æä¹Ø±Õ
select spid
from master.dbo.sysprocesses
where dbid= db_id('Êý¾Ý¿âÃû')
 --db_id('DoNet')
Èçspid ÖµÎª 52.
2. 執ÐÐ:   
 kill 52
3.ÐÞ¸Ä數據庫Ãû
EXEC sp_dboption 'old_db_name', 'Single User', 'false'
&nb ......

sql ´æ´¢¹ý³ÌÉú³Ésql ²åÈëÓï¾ä

ÔÚ²éѯ·ÖÎöÆ÷ÒÔ“Îı¾ÏÔʾ½á¹û”·½·¨Ö´ÐР
exec  UspOutputData  ÄãµÄ±íÃû 
µÃµ½µ¼³öÊý¾ÝµÄÓï¾ä£¬µ«image,text,ntext,sql_variant  Áв»³öÏÖÔÚÓï¾ä£¬ÒÔºó¸Ä½ø¡£ 
 
´æ´¢¹ý³ÌUspOutputDataÈçÏ£º 
 
CREATE      PROCEDURE  ......

SQL SERVERµÄÊý¾ÝÀàÐÍ

.SQL SERVERµÄÊý¾ÝÀàÐÍ
  Êý¾ÝÀàŪÊÇÊý¾ÝµÄÒ»ÖÖÊôÐÔ£¬±íʾÊý¾ÝËù±íʾÐÅÏ¢µÄÀàÐÍ¡£ÈκÎÒ»ÖÖ¼ÆËã»úÓïÑÔ¶¼¶¨ÒåÁË×Ô¼ºµÄÊý¾ÝÀàÐÍ¡£µ±È»£¬²»Í¬µÄ³ÌÐòÓïÑÔ¶¼¾ßÓв»Í¬µÄÌص㣬Ëù¶¨ÒåµÄÊý¾ÝÀàÐ͵ĸ÷ÀàºÍÃû³Æ¶¼»ò¶à»òÉÙÓÐЩ²»Í¬¡£SQLServer ÌṩÁË 25 ÖÖÊý¾ÝÀàÐÍ£º
  ·Binary [(n)]
  ·Varbinary [ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ