µãµãµÎµÎ(Oracle)
insert into
select * into t_dest from t_src; -- ÒªÇóÄ¿±ê±í²»´æÔÚ
insert into t_dest(a, b) select a, b from t_src; -- ÒªÇóÄ¿±ê±íÒÑ´æÔÚ
¶¯Ì¬SQL
execute immediate 'select ' || sq_serialnum || '.nextval from dual' into i_serialnum;
°´ÕÕÆ´Òô,²¿Ê×,±Ê»ÅÅÐò
ÏÂÃæµÄ·½·¨ÐèÒªORACLE9iºÍÒÔÉϵİ汾²ÅÖ§³Ö.
Oracle9i֮ǰ, ÖÐÎÄÊÇ°´ÕÕ¶þ½øÖƱàÂë½øÐÐÅÅÐòµÄ.
ÔÚoracle9iÖÐÐÂÔöÁË°´ÕÕÆ´Òô,²¿Ê×,±Ê»ÅÅÐò¹¦ÄÜ. ÉèÖÃNLS_SORTÖµ
SCHINESE_RADICAL_M °´ÕÕ²¿Ê×(µÚһ˳Ðò),±Ê»®(µÚ¶þ˳Ðò)ÅÅÐò
SCHINESE_STROKE_M °´Õձʻ®(µÚһ˳Ðò),²¿Ê×(µÚ¶þ˳Ðò)ÅÅÐò
SCHINESE_PINYIN_M °´ÕÕÆ´ÒôÅÅÐò, ϵͳµÄĬÈÏÅÅÐò·½Ê½ÎªÆ´ÒôÅÅÐò
select * from table_name order by nlssort(field_name, 'nls_sort=SCHINESE_STROKE_M');
È¡ºÁÃë(oracle 9i +)
select to_char(systimestamp,'yyyy-mm-dd hh24:mi:ss.ff3') from dual;
like²éѯÏ»®Ïß±¾Éí
select * from test where columnname like 'a\_%' escape '\';
-- ±íʾ½«½ô¸úÔÚescape×Ö·ûºóµÄ×Ö·û½âÊÍΪ×Ö·û±¾Éí, ¶ø·ÇתÒå×Ö·û
ÈÕÆÚ¼õÈ¥Ò»Ãë
select sysdate,sysdate - interval '1' second from dual;
Ð޸ıí½á¹¹
alter table t_employee add (remark varchar2(50)); --Ôö¼ÓÁÐ
alter table t_employee modify (sex default 0); --ÐÞ¸ÄÁеÄĬÈÏÖµ
alter table t_employee modify (remark null); --ÐÞ¸ÄÁпÉΪ¿Õ
alter table t_employee rename to t_employee_new; --Ð޸ıíÃû
&
Ïà¹ØÎĵµ£º
oracleº¯Êý´óÈ«-Êý×Ö´¦Àíº¯Êý
F.3 Êý×Öº¯Êý
º¯Êý½ÓÊÜNUMBERÀàÐ͵IJÎÊý²¢·µ»ØNUMBERÀàÐ͵ÄÊýÖµ.³¬Ô½º¯ÊýºÍÈý½Çº¯ÊýµÄ·µ»ØÖµ¾«È·µ½36λ.ACOS¡¢ASIN¡¢ATAN¡¢ATAN2µÄ½á¹û¾«È·µ½36λ.
l ABS
Óï·¨: ABS(x)
¹¦ÄÜ: µÃµ½xµÄ¾ø¶ÔÖ ......
oracle8i Çý¶¯ ojdbc14.jar Õâ¸öÇý¶¯ÓÐÎÊÌ⣬·ÖҳʱҪÊÖ¶¯ д rownum<m ,Ëü×Ô¶¯³ÉÉúµÄ·ÖÒ³²»ÕýÈ·£¬ÓõÄmysqlµÄtop m
Null value was assigned to a property of primitive °ÑentityÖÐintÀàÐ͸ijÉInteger ¿âÖв»ÉèÖÃnullable
number(9) µÄid ²»ÄÜÓÃInterger,µÃÓÃBigDecimal,Òª²»È»È¡idʱ»á±¨´í ......
1.°²×°Ê±ÒªÖ´ÐÐÁ½¸ö½Å±¾£¬root.shÊÇÆäÖÐÒ»¸ö¡£
ÐèÒªÓÃrootÓû§Ö´ÐÐroot.shÈ¥Éú³É/etc/oratabÎļþ¡£————1.dbcaÖв»»áÓÐɾ³ýÑ¡Ïî(ÒòΪÔËÐÐʱÐèÒª/etc/oratab)
& ......
1import java.sql.*;
2import java.util.logging.Level;
3import java.util.logging.Logger;
4
5/** *//**
6 * Title: JDBCÁ¬½ÓÊý¾Ý¿â
7 * Description: ±¾ÊµÀýÑÝʾÈçºÎʹÓÃJDBCÁ¬½ÓOracleÊý¾Ý¿â£¬²¢ÑÝʾÌí¼ÓÊý¾ÝºÍ²éѯÊý¾Ý.
8 */
9public class JDBCExampl ......