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

sql ÃüÃûÎÊÌâ

ÕýÈ·µÄ£ºselect isnull(money,0) from (select  sum(money) as money,3 as b from zhangbenjilu where datepart(month,usedatetime)=3) as a
´íÎóµÄ£ºselect isnull(money,0) from (select  sum(money) as money,3  from zhangbenjilu where datepart(month,usedatetime)=3)


Ïà¹ØÎĵµ£º

×ܽáSQLite²»Ö§³ÖµÄSQLÓï·¨ÓÐÄÄЩ


1 TOP
ÕâÊÇÒ»¸ö´ó¼Ò¾­³£Îʵ½µÄÎÊÌ⣬ÀýÈçÔÚSQLSERVERÖпÉÒÔʹÓÃÈçÏÂÓï¾äÀ´È¡µÃ¼Ç¼¼¯ÖеÄÇ°Ê®Ìõ¼Ç¼£º
SELECT TOP 10 * from [index] ORDER BY indexid DESC;
µ«ÊÇÕâÌõSQLÓï¾äÔÚSQLiteÖÐÊÇÎÞ·¨Ö´Ðеģ¬Ó¦¸Ã¸ÄΪ£º
SELECT * from [index] ORDER BY indexid DESC limit 0,10;
ÆäÖÐlimit 0,10±íʾ´ÓµÚ0Ìõ¼Ç¼¿ªÊ¼£¬Íùºó ......

MS SQL ServerºÍMySQLÇø±ð

1 MySQLÖ§³Öenum,ºÍsetÀàÐÍ£¬SQL Server²»Ö§³Ö
¡¡¡¡2 MySQL²»Ö§³Önchar,nvarchar,ntextÀàÐÍ
¡¡¡¡3 MySQLµÄµÝÔöÓï¾äÊÇAUTO_INCREMENT£¬¶øMS SQLÊÇidentity(1,1)
¡¡¡¡4 MS SQLĬÈϵ½´¦±í´´½¨Óï¾äµÄĬÈÏÖµ±íʾÊÇ((0)),¶øÔÚMySQLÀïÃæÊDz»ÔÊÐí´øÁ½À¨ºÅµÄ
¡¡¡¡5 MySQLÐèҪΪ±íÖ¸¶¨´æ´¢ÀàÐÍ
¡¡¡¡6 MS SQLʶ±ð·ûÊÇ[],[type]±íÊ ......

SQL SERVER 2005Êý¾Ý¿â¾µÏñ

ͨ¹ýµÚÆßÆں͵ڰËÆÚµÄÎÄÕ£¬ÎÒÃÇÁ˽âÁËSQL SERVER 2005Êý¾Ý¿âµÄÔ­Àí¡¢ÊµÏÖ·½Ê½ÒÔ¼°SQL SERVER 2005Ôڸ߿ÉÓᢸßÐÔÄܺ͸߱£»¤Ä£Ê½Ï»áÓв»Í¬µÄÊý¾Ý¿â¾µÏñ״̬£¬¶øÇÒÁ˽âÁËSQL SERVER 2005ÔÚ²»Í¬Ó¦ÓÃģʽϹÊÕÏתÒƵķ½Ê½¡£½ÓÏÂÀ´£¬ÎÒÃǽ«¸ù¾ÝÒÔÏÂÁ½Ààʼþ¶ÔÊý¾Ý¿â¾µÏñÔ¤ÆڵĿÉÓÃÐÔ½øÐзÖÎö£º
Ò»¸ö»ò¶à¸ö·þÎñÆ÷»òÕßÊý¾Ý¿âʧ° ......

SQL 2005 xml ´¦ÀíµÄһЩsample

USE Test
--Create 2 tables as an example
CREATE TABLE ExampleTable
(
[ID] int PRIMARY KEY
,[Name] nvarchar(256)
)
CREATE TABLE ExampleTable2
(
[ID] int PRIMARY KEY
,[Name] nvarchar(256)
)
----way1
SELECT *
from sys.objects [table]
WHERE
[Name] LIKE 'ExampleTable%'
FOR XML AUTO, ROOT ......

SQL MINUSµÄÓ÷¨


< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ