ÅúÁ¿Éú³ÉͬÀàÐÍsqlÓï¾äµÄ½Å±¾
--ÔÚÈÕ³£Î¬»¤£¬¿ª·¢Öг£Óöµ½Ð´Ò»ÏµÁнṹÀàÐ͵ÄsqlÓï¾ä£¬ºÜ·³ºÜÀÛÆäʵ¿ÉÒÔ
--ÀûÓÃSQL*PLUS»·¾³ÃüÁî Éú³É½Å±¾Îļþ
set heading off --¹Ø±ÕÁеıêÌâ
set feedback off --¹Ø±Õ·´À¡ÐÅÏ¢
spool c:\aa.txt --»º³åдÎļþc:\aa.txt
em£º
select 'insert into dept values ('||deptno||','||''''||dname||''''||','||''''||loc||''''||');' from dept; --Ö´ÐÐselectÓï¾ä
spool off --¹Ø±Õ»º³å
--ÎÒÓöµ½¹ýµÄ2¸öÓ¦ÓÃ
--µ¼³öij¸öÓû§ÏÂËùÓеĽ¨±íÓï¾ä£¨Ò²¿É½èÖúÆäËû¹¤¾ßʵÏÖ£¬casestudio£¬powerdesignµÈ£©
SELECT 'SELECT TO_CHAR(DBMS_METADATA.GET_DDL(''TABLE'','''||TABLE_NAME||'''))'||' from dual;'
from ALL_TABLES where owner='SYSTEM';
--killµ±Ç°²¿·Ösession
select username,'alter system kill session '||''''||sid||','||serial#||''''||';' from v$session where username is not null and username not like 'SHGX%' AND USERNAME !='SDE' AND USERNAME!='SYS'order by username£»
µÈµÈ
Ïà¹ØÎĵµ£º
String keyword = request.getParameter("keyword");
String timeRange = request.getParameter("timeRange");
String type = request.getParameter("type");
StringBuffer sql = new StringBuffer();
sql.append("use webstation_leadall s ......
Ò»¡¢ ¼òµ¥²éѯ
¡¡¡¡¼òµ¥µÄTransact-SQL²éѯֻ°üÀ¨Ñ¡ÔñÁÐ±í¡¢from×Ó¾äºÍWHERE×Ӿ䡣ËüÃÇ·Ö±ð˵Ã÷Ëù²éѯÁС¢²éѯµÄ±í»òÊÓͼ¡¢ÒÔ¼°ËÑË÷Ìõ¼þµÈ¡£
¡¡¡¡ÀýÈ磬ÏÂÃæµÄÓï¾ä²éѯtesttable±íÖÐÐÕÃûΪ“ÕÅÈý”µÄnickname×ֶκÍemail×ֶΡ£
¡¡¡¡SELECT nickname,email
¡¡¡¡from testtable
¡¡¡¡WHERE name='ÕÅÈý'
......
CyberSavvy ¼áÐÅÈí¼þ×Ô¶¯»¯¿ÉÒÔÈÿͻ§ÇáËÉÏíÊÜÉú»î¡£DataPlace ÊǸù«Ë¾µÄÈí¼þ¼´·þÎñ½â¾ö·½°¸£¬Ò²¿É³Æ֮Ϊ“Êý¾Ý¿â¹¤³§”£¬ËüÄܹ»ÈÃÃæÏò¼¼ÊõÒÔ¼°ÃæÏòÉÌÎñµÄÓû§´´½¨²¢ÐÞ¸Ä×Ô¼ºµÄÊý¾Ý¿â£¬¶øCyberSavvy ¹«Ë¾½«Îª¸ÃÊý¾Ý¿âÌṩÍйܷþÎñ¡£Òò´ËCyberSavvy ¹«Ë¾ÐèÒªÅÍʯ°ã¼á¹ÌµÄÊý¾Ý¿â£¬²¢Í¨¹ýÍòÎÞһʧµÄÊý¾Ý´«Êä»úÖÆÀ´Ö ......
-->Title:Generating test data
-->Author:wufeng4552
-->Date :2009-09-25 09:56:07
if object_id('tb')is not null drop table tb
go
create table tb(ID int,name text)
insert tb select 1,'test'
go
--·½·¨1
select sql_variant_property(ID,'BaseType') from tb
--·½·¨2
select object_name(ID)± ......