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)
Ïà¹ØÎĵµ£º
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Ìõ¼Ç¼¿ªÊ¼£¬Íùºó ......
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ÔÚ²»Í¬Ó¦ÓÃģʽϹÊÕÏתÒƵķ½Ê½¡£½ÓÏÂÀ´£¬ÎÒÃǽ«¸ù¾ÝÒÔÏÂÁ½Ààʼþ¶ÔÊý¾Ý¿â¾µÏñÔ¤ÆڵĿÉÓÃÐÔ½øÐзÖÎö£º
Ò»¸ö»ò¶à¸ö·þÎñÆ÷»òÕßÊý¾Ý¿âʧ° ......
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 ......
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text");
......