查看積分策略說明發表回覆
Discuz! 代碼
提示插入
直接插入
說明訊息

插入粗體文本 插入斜體文本 插入下劃線 置中對齊 插入超級連結 插入信件位址 插入圖像 插入 flash 插入代碼 插入引言 插入列表
刪除線 直線分隔線 虛線分隔線
    
添加文字底框
內容 [字數檢查]:

表情符號

更多 Smilies
字型大小 |||
溫馨提示:本區開放遊客瀏覽。


文章關鍵字 : [功能說明]
(關鍵字可加強搜索準確性, 如關鍵字多於一組, 請以 , 作分隔, e.g. : 阿笨,shiuh,第一笨)

 關閉 URL 識別 | html 禁用
 關閉 表情符號 | 表情符號 可用
 關閉 Discuz! 代碼 | Discuz! 代碼 可用
使用個人簽名
接收新回覆信件通知
推薦放檔網絡空間

檔案(Torent, zip等)
  1. freedl
  2. multiupload
  3. btghost
  4. 便當狗
  5. mediafire
  6. pillowangel
圖片(JPG, GIF等)
  1. hotimg
  2. tinypic
  3. mousems2
  4. imageshack
  5. imm.io
>>>歡迎推薦好用空間


最新10篇文章回顧
OverZero

 發表於 2004-12-6 09:39 PM

謝謝大大的回覆!


Hala007

 發表於 2004-12-4 12:03 PM

在管理 -> Job 中設定定期執行該 T-SQL即可


onlive

 發表於 2004-12-3 07:27 PM


引用:
OverZero寫到:
您上的SQL Command我會
我只是想知道…如何讓它 "定期" 的回歸0
如果用SQL Command的話 還算手動的不是嗎@_@


寫個程式用排程執行就可以定期執行歸零的SQL查詢

另外

之前有用ASP.NET所以稍微有碰一點資料型態

char 10 的話 如果你的輸入內容只有5個字元,他會把剩下的部分填空用滿10個字元。

varchar   這個就不會跟char一樣把沒用滿的部分填滿,輸入幾個字就是幾個字。


OverZero

 發表於 2004-12-3 07:12 PM


引用:
最後...
要定期把欄位清成0...
那就寫個SQL Command把它數值設定為0就好了喔
Update [Table_Name] set [Field_Name] = 0
至於條件以及設定就看你要如何設計都可以


首先謝謝你的回答

不好意思再問一下
您上的SQL Command我會
我只是想知道…如何讓它 "定期" 的回歸0
如果用SQL Command的話 還算手動的不是嗎@_@


Vic

 發表於 2004-12-3 10:52 AM

OB兄 送你一支花~

熊小也來提供一個有關mysql datatype的網頁
http://linux.tnc.edu.tw/techdoc/ ... e.html#Column_types

其實那裡是mysql中文manual~ 裡面有用的東西不少~
http://linux.tnc.edu.tw/techdoc/mysql/mysql_doc/manual_toc.html


Outbreak

 發表於 2004-12-3 09:34 AM


引用:
OverZero寫到:
關於MS-SQL裡面的相關數據類型
有大大有在研究嗎?
我還是不怎麼懂它的意思

例:char varchar nchar nvarchar text ntext
這些是什麼意思呢?

還有就是我要SQL裡面的一個表格定期清空裡面的數字 規為0
請問SQL辦的到嗎?不然我都要手動清楚



參考一下資料型態解說吧



再來是英文說明,有劃重點了喔...
The most commonly used character datatypes, char and varchar, store data in a fixed or variable length format respectively. Use char if a column has a consistent length, such as a two-character State field. If char is defined as char(20), it uses 20 bytes of storage even if only five characters are entered into the field; data is padded with blanks up to the full field size. For a variable length column, such as a Description or Name field, varchar would be a better choice because it doesn't pad the data with spaces, and the amount of bytes required is the actual length of the character data. Char and varchar can store up to 8,000 characters.

The Unicode variants are nvarchar and nchar. These have the same properties, but data is stored in Unicode format. Unicode supports a wider range of characters, but each character requires two bytes of storage. This limits the available storage to 4,000 characters.

To store character strings and binary data that might exceed 8,000 bytes, use the text, ntext, and image datatypes. For example, to store large text files (.txt), you would define a column as text or ntext depending on the requirement for Unicode support. For storing images (.gif), a better choice would be the image datatype.

最後...
要定期把欄位清成0...
那就寫個SQL Command把它數值設定為0就好了喔
Update [Table_Name] set [Field_Name] = 0
至於條件以及設定就看你要如何設計都可以


OverZero

 發表於 2004-12-3 09:01 AM

關於MS-SQL裡面的相關數據類型
有大大有在研究嗎?
我還是不怎麼懂它的意思

例:char varchar nchar nvarchar text ntext
這些是什麼意思呢?

還有就是我要SQL裡面的一個表格定期清空裡面的數字 規為0
請問SQL辦的到嗎?不然我都要手動清楚





所在時區為 GMT+8, 現在時間是 2024-9-29 09:26 PM
清除 Cookies - 連絡我們 - TWed2k © 2001-2046 - 純文字版 - 說明
Discuz! 0.1 | Processed in 0.020554 second(s), 6 queries , Qzip disabled