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

SQLʱ¼äת»»¸ñʽ

select Convert( varchar(20) , ʱ¼ä×ֶΠ, ¸ñʽ ) from ±í È磺select Convert(varchar(20),LOGIN_DATE,112) from dbo.C_PARTY_CLIENT 100£ºJun 22 2009 12:00AM 101£º06/22/2009 102£º2009.06.22 103£º22/06/2009 104£º22.06.2009 105£º22-06-2009 106£º22
select Convert(varchar(20),<ʱ¼ä×Ö¶Î>,<¸ñʽ>) from <±í>
È磺select Convert(varchar(20),LOGIN_DATE,112) from dbo.C_PARTY_CLIENT
100£ºJun 22 2009 12:00AM
101£º06/22/2009
102£º2009.06.22
103£º22/06/2009
104£º22.06.2009
105£º22-06-2009
106£º22 Jun 2009
107£ºJun 22, 2009
108£º00:00:00
109£ºJun 22 2009 12:00:00
110£º06-22-2009
111£º2009/06/22
112£º20090622
113£º22 Jun 2009 00:00:00
114£º00:00:00:000
120£º2009-06-22 00:00:00.
126:2009-06-22T00:00:00
127£º2009-06-22T00:00:00
131£º29/06/1430 12:00:00:
 ¸½ÉÏʱ¼ä±È½Ï£º
SELECT * from [TABLE] where   convert(varchar(10),<ʱ¼ä×Ö¶Î>,111) = @Time
SELECT * from ManualSign where  SignTime  BETWEEN  convert(datetime,@beginTime )  AND  convert(datetime,@endTime)
Ï£Íû¶Ô´ó¼ÒÓаïÖú¡£
 


Ïà¹ØÎĵµ£º

SqlÓï¾äµÄ³£Ó÷½·¨

1.ÈçºÎ½«Ò»¸öSQL Server±íµÄ½á¹¹¸´ÖƵ½ÁíÒ»¸öн¨µÄ±íÖÐ
    select * into бí from ¾É±í where 0 = 1
2.ÐÞ¸Ä×Ö¶ÎĬÈÏÖµ
    alter table ±íÃû add default ĬÈÏÖµ for ×Ö¶ÎÃû
3. È¡µÃÊý¾Ý¿â½á¹¹
    SELECT name from sysdatabases
4.Ôö¼ÓÁÐ
  ......

±ê×¼µÄ SQL µÄ½âÎö˳Ðò

±ê×¼µÄ SQL µÄ½âÎö˳ÐòΪ:
(
1
).
from
×Ó¾ä, ×é×°À´×Ô²»Í¬Êý¾ÝÔ´µÄÊý¾Ý
(
2
).
WHERE
×Ó¾ä, »ùÓÚÖ¸¶¨µÄÌõ¼þ¶Ô¼Ç¼½øÐÐɸѡ
(
3
).
GROUP

BY
×Ó¾ä, ½«Êý¾Ý»®·ÖΪ¶à¸ö·Ö×é
(
4
).ʹÓþۺϺ¯Êý½øÐмÆËã
(
5
).ʹÓÃ
HAVING
×Ó¾äɸѡ·Ö×é
(
6
).¼ÆËãËùÓеıí´ïʽ
......

v$sql,v$sqlarea,v$sqltextÓÐʲôÇø±ð

http://inthirties.com:90/thread-1202-1-1.html
v$sqltext
´æ´¢µÄÊÇÍêÕûµÄSQL,SQL±»·Ö¸î
SQL> desc v$sqltext
Name Null? Type
----------------------------------------- -------- ----------------------------
ADDRESS ......

linq to sql ÖдÓdbmlÎļþÖд´½¨Êý¾Ý¿â

        ½ñÌìºÜÓôÃÆ,ʵÑéÊҵķþÎñÆ÷¶«Î÷¶¼Ã»ÓÐÁË,¶øÎÒµÄÊý¾Ý¿âÓÖÔÚÄÄÀï,ÎÒÓÖûÓб¸·Ý,°ÑÎÒÒÖÓôµÄÒªÃü,ÐÒ¿÷ÎÒÓõÄlinq to sql.×ÐϸÏëÏë,ËûµÄdbmlÎļþ»ù±¾°üº¬ÁËÊý¾Ý¿âµÄËùÓÐÄÚÈÝ,ËùÒÔ,Ò»¶¨Óа취´ÓdbmlÎļþÖд´½¨Êý¾Ý¿â!
        Ñо¿ÁËÒ»¶ÎÊ ......

Sql Server²é¿´ËùÓÐÊý¾Ý¿âÃû,±íÃû,×Ö¶ÎÃûSQL

1.»ñÈ¡ËùÓÐÊý¾Ý¿âÃû:
SELECT Name from Master..SysDatabases ORDER BY Name
2.»ñÈ¡ËùÓбíÃû:
SELECT Name from DatabaseName..SysObjects Where XType='U' ORDER BY Name
XType='U':±íʾËùÓÐÓû§±í;
XType='S':±íʾËùÓÐϵͳ±í;
3.»ñÈ¡ËùÓÐ×Ö¶ÎÃû:
SELECT Name from SysColumns WHERE id=Object_Id('TableNam ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ