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

sql ÈÕÆÚת»»

Select  
CONVERT(varchar, getdate(), 1),--mm/dd/yy  
CONVERT(varchar, getdate(), 2),--yy.mm.dd  
CONVERT(varchar, getdate(), 3),--dd/mm/yy  
CONVERT(varchar, getdate(), 4),--dd.mm.yy  
CONVERT(varchar, getdate(), 5),--dd-mm-yy  
CONVERT(varchar, getdate(), 10),--mm-dd-yy  
CONVERT(varchar, getdate(), 11),--yy/mm/dd  
CONVERT(varchar, getdate(), 12),--yymmdd 
 ----´øÊÀ¼ÍºÅ 
select convert(varchar(10),getdate(),100) --06 15 2007 »ò0 
select convert(varchar(10),getdate(),102) --2007.06.15 
select convert(varchar(10),getdate(),103) --15/06/2007 
select convert(varchar(10),getdate(),104) --15.06.2007 
select convert(varchar(10),getdate(),105) --15-06-2007 
select convert(varchar(10),getdate(),106) --15 06 2007 
select convert(varchar(10),getdate(),107) --06-15,200 
select convert(varchar(10),getdate(),108) --10:06:46 µ±Ç°Ê±¼ä 
select convert(varchar(10),getdate(),109) --06 15 2007 »òÕß9 
select convert(varchar(10),getdate(),110) --06-15-2007 
select convert(varchar(10),getdate(),111) --2007/06/15 
select convert(varchar(10),getdate(),112) --20070615select convert(varchar(10),getdate(),113) --15 06 2007 »òÕß13 
select convert(varchar(10),getdate(),114) --10:10:37:0 
select convert(varchar(10),getdate(),120) --2007-06-15 »ò20 
select convert(varchar(30),getdate(),121) --2007-06-15 10:11:45.040 »ò21 
select convert(varchar(30),getdate(),126) --2007-06-15T10:12:44:603s 
elect convert(varchar(50),getdate(),127) --2007-06-15T10:14:35:433 ˵´øʱÇø 
select convert(varchar(40),getdate(),130) --»ØÀúdd mon yyyy hh:mi:ss:mmmAM 
select convert(varchar(30),getdate(),131) --30/05/1428 10:17:19:470AM
12Сʱת»»³É24Сʱ
select dateadd(hh,24,getdate())
xml Êý¾ÝµÄת»»
convert(datetime, x.item.value('SaleCEOCheckDate[1]','DateTime'),120) AS SaleCEOCheckDate,


Ïà¹ØÎĵµ£º

sql loader ʹÓÃ


sql loader¿ÉÒÔ°ÑһЩÒÔÎı¾¸ñʽ´æ·ÅµÄÊý¾Ý˳ÀûµÄµ¼Èëµ½oracleÊý¾Ý¿âÖУ¬ÊÇÒ»ÖÖÔÚ²»Í¬Êý¾Ý¿âÖ®¼ä½øÐÐÊý¾ÝǨÒƵķdz£·½±ã¶øÇÒͨÓõŤ¾ß¡£                            &n ......

QtÊý¾Ý¿â£¨Èý£©ÀûÓÃQSqlQueryÀàÖ´ÐÐSQLÓï¾ä£¨Ò»£©


±¾ÎÄÕÂÔ­´´ÓÚwww.yafeilinux.com ×ªÔØÇë×¢Ã÷³ö´¦¡£
SQL¼´½á¹¹»¯²éѯÓïÑÔ£¬ÊǹØϵÊý¾Ý¿âµÄ±ê×¼ÓïÑÔ¡£Ç°ÃæÒѾ­Ìáµ½£¬ÔÚQtÖÐÀûÓÃQSqlQueryÀàʵÏÖÁËÖ´ÐÐSQLÓï¾ä¡£ÐèҪ˵Ã÷£¬ÎÒÃÇÕâÀïÖ»ÊÇQt½Ì³Ì£¬¶ø·ÇרҵµÄÊý¾Ý¿â½Ì³Ì£¬ËùÒÔÎÒÃDz»»á¶ÔÊý¾Ý¿âÖеÄһЩ֪ʶ½øÐÐÉîÈë½²½â£¬ÏÂÃæÖ»ÊǶÔ×î³£Óõļ¸¸ö֪ʶµã½øÐн²½â¡£
ÎÒÃÇÏÂÃ ......

oracle³£ÓÃsqlÓï¾ä

ÐÞ¸ÄÁÐÊôÐÔ
alter table tablename modify(name ,varchar2(10)) Áпí¶È²»µÃСÓÚÐÞ¸ÄÇ°µÄ¿í¶È
ÈÕÖ¾¹ÜÀí
ÊÓͼ v$logfile
alter database add logfile 'd:\orcl01.log' size 10m;//Ìí¼Ó×é
alter database add logfile member 'd:\orcl02.log' to group 4;//Ïò4×éÖÐÌí¼Ó³ÉÔ±
alter database drop logfile member 'd: ......

sqlС±Ê¼Ç£¨5.26£©

sql server 2005 ¼òµ¥ÔËÓú¯Êý
1.null º¯Êý
  Ó÷¨ÓëoracleÖÐnvl()ÀàËÆ£¬´¦Àíº¯ÊýΪisnull()£¬
  ÀýÈ磺
    select ename,sal+isnull(comm,0)
    from emp
    go
  isnull(comm,0)µÄÓ÷¨ÊÇ£º commΪnull Ôò·µ»Ø0 ·ñÔòΪ commµÄÖµ¡£
2.V ......

ÀûÓÃhibernateµÄQueryÖ±½ÓÖ´ÐÐSQLÓï¾ä

ÀûÓÃhibernateµÄQuery½øÐÐÖ±½ÓÖ´ÐÐSQLÓï¾ä
Ò»¡¢
String sql = "insert into SHOP_MALL_ACCOUNT_MAP_T (MALL_NO,ACCOUNT) values ('"
+ mallNo + "','" + userId + "')";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();
¶þ¡¢
String sql = "select to_char(SYN_DATE,' ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ