oracleÖ®°Ñ±íÎļþµ¼³ö³ÉÎı¾Îļþ
1 spool
spool d:\test\table.dat
select * from table_name;
spool off
2 sqlplus user/password@sid @test.sql > table.dat
test.sql
select * from table_name;
exit;
Ïà¹ØÎĵµ£º
²âÊÔtable
create table table1 (id int,name char)
insert into table1
select 1,'q'
union all select 2,'r'
union all select 3,'3'
union all select 4,'5'
ÒªÇó°´Ö¸¶¨µÄid˳Ðò(±ÈÈç2,1,4,3)ÅÅÁлñÈ¡table1µÄÊý¾Ý
·½·¨1:ʹÓÃunion all,µ«ÊÇÓÐ256ÌõÊý¾ÝµÄÏÞÖÆ
select id,name from table1 where id=2
union al ......
ORACLEÏÂɾ³ýµ±Ç°Óû§ÏÂËùÓжÔÏóµÄSQL
Sql´úÂë
--ɾ³ýij¸öÓû§ÏµĶÔÏó
set heading off;
set feedback off;
spool c:\dropobj.sql;
prompt --Drop constraint
select 'alter t ......
µÚÒ»ÖÖÇé¿ö£ºÎÞ·µ»ØÖµ.
create or replace procedure test_a(param1 in varchar2,param2 in varchar2) as
begin
insert into test value(param1,param2);
&nb ......
¿ªÔ´¿çƽ̨±à³ÌÓïÑÔJava¼ÓÉÏ¿ªÔ´Êý¾Ý¿âMySQL£¡×ÔSunÊÕ¹ºMySQL¿ªÊ¼£¬±¾ÒÔΪSun½«´óÕ¹ºêͼ¡£È»SunȴûÓаÑÎÕ»ú»á£¬·´¶øÃ»ÓнûµÃס½ðÈÚΣ»úµÄ³å»÷¡£ÂäµÃ¸öÃæÁÙÊÕ¹ºµÄ¾ÖÃæ¡£»òÐíMySQLÖ®¸¸Richard StallmanÒ²¾ø¶ÔûÓÐÏëµ½£¬ÈÃSunÊÕ¹ºMySQL£¬È´ÊǰÑMySQLÍÆÏòÁËÉîÔ¨¡£MySQLµÄºÎÈ¥ºÎ´Ó£¡
Ãæ¶ÔÕâ¸öÎÊÌ⣬MySQLÖ ......
oracle ÈÕÆÚº¯Êý
ÔÚoracleÊý¾Ý¿âµÄ¿ª·¢ÖУ¬³£ÒòΪʱ¼äµÄÎÊÌâ´ó·ÑÖÜÕ£¬ËùÒÔÌØµØ½«ORACLEÊý¾ÝµÄÈÕÆÚº¯ÊýÊÕ²ØÖ´ˡ£Ä˹©
ËûÈÕËù²éÒ²¡£
add_months(d,n) ÈÕÆÚd¼Ón¸öÔÂ
last_day(d) °üº¬dµÄÔÂ?µÄ×îºóÒ»ÌìµÄÈÕÆÚ
new_time(d,a,b) a?ÇøµÄÈÕÆÚºÍ??dÔÚb?ÇøµÄÈÕÆÚºÍ??
next_day(d,day) ±È ......