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

·ÃÎÊoracleÊý¾Ý¿â

1¡£web.config ----appSettings--<add key="LimsConnection" value="data source=yzlims;user id=lims;password = lims"/>
2.  c#´úÂëÖÐ
using System.Data.OracleClient;     
public DataTable  GetLimsTimeInSpace(string S_SAMPLE_NAME, string S_SAMPLING_P_N,DateTime startTime, DateTime endTime)
        {
            DataTable dt = new DataTable();
            OracleConnection conn = new System.Data.OracleClient.OracleConnection(System.Configuration.ConfigurationSettings.AppSettings["LimsConnection"]);
            try
            {
                if (conn.State != ConnectionState.Open)
               conn.Open ();
                string strSql = string.Format(@"select  distinct( s_sampled_date)
                                      from (select row_number() over(order by s_sampled_date desc) rn, t.*
                                              from yzlims.xt_table t
                              &


Ïà¹ØÎĵµ£º

oracle ³£Ó÷ÖÎöº¯Êý

Oracle³£Ó÷ÖÎöº¯Êý
ROW_NUMBER
·µ»ØÓÐÐò×éÖÐÒ»ÐеÄÆ«ÒÆÁ¿£¬´Ó¶ø¿ÉÓÃÓÚ°´Ìض¨±ê×¼ÅÅÐòµÄÐкÅ
row_number() over(partition by ... order by ...)
RANK
¸ù¾ÝORDER BY×Ó¾äÖбí´ïʽµÄÖµ£¬´Ó²éѯ·µ»ØµÄÿһÐУ¬¼ÆËãËüÃÇÓëÆäËüÐеÄÏà¶ÔλÖá£×éÄÚµÄÊý¾Ý°´ORDER BY×Ó¾äÅÅÐò£¬È»ºó¸øÿһÐи³Ò»¸öºÅ£¬´Ó¶øÐγÉÒ»¸öÐòÁУ¬¸ÃÐòÁ ......

Éî¶È¶Ô±ÈOracleÓëSQL Server——µÚÈý²¿·Ö

Æô¶¯ÓëÅäÖòÎÊý ¸ü¸ÄϵͳԪÊý¾ÝºÍ²ÎÊýÅäÖà ¶¯Ì¬ÊÓͼ ´æ´¢µÄÎïÀíºÍÂß¼­½á¹¹ Æô¶¯ºÍ¹Ø±Õ
topÆô¶¯ÓëÅäÖòÎÊý
ÔÚSQL Server°²×°µÄʱºò£¬Í¬Ê±Ò²»áÍùWindows×¢²á±íÀïÃæÌí¼ÓһЩ¼Ç¼£¬ÕâЩע²á±í¼üÖµÖ¸¶¨ÁËʵÀýËùÐèÒªµÄ¸÷ÖÖ²ÎÊý¡£±ÈÈ磬ÓеÄ×¢²á±í¼üÖµÖ¸¶¨ÁË´íÎóÈÕÖ¾µÄ±£´æĿ¼£¬ÁíÍâµÄÖ¸¶¨ÁËĬÈϵı¸·ÝĿ¼µÈµÈ¡£SQL ServerÔÚÔ ......

oracle²»Í¬schemaÖ®¼ä½¨Íâ¼ü

ÐèҪȨÏÞ:
  grant references on test_sys to user_1;
 or
  grant all on test_sys to user_1;
²âÊÔ£º
sysÓû§ÏÂ:
SQL> create user user_1 identified by user_1;
Óû§ÒÑ´´½¨¡£
SQL> grant dba to user_1;
ÊÚȨ³É¹¦¡£
SQL> create table test_sys(pk_col varchar2(5))
  2&nbs ......

Oracle»ù´¡

 
1¡¢Ä¬ÈÏÊÂÀý£º
Óû§Ãû£ºscottÃÜÂ룺tiger Ö÷»ú×Ö·û´®£º±¾»ú¿ÉÒÔΪ¿Õ
2¡¢Æô¶¯·½·¨£º
ÔËÐУºsqlplus scott/tiger@lhd
3¡¢SQLPLUS»ù±¾ÃüÁ
Desc£ºÏÔʾ±í¡¢ÊÓͼ½á¹¹  desc ±íÃû£¬ÊÓͼ
List£ºÁгöSQL»º³åÇøÇøÖеÄÒ»Ðлò¶àÐÐÃüÁîÓï¾ä
Exit£ºÍ˳ö
4¡¢³£ÓõÄÊý¾Ý×Öµä(ÈýÖÖǰ׺£ºUSER£¬ALL£¬DBA)
USER_TABL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ