久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

在sql server中保留單個數據的正確方法?

Proper way to keep a single data in sql server?(在sql server中保留單個數據的正確方法?)
本文介紹了在sql server中保留單個數據的正確方法?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個包含很多列和行的表 (myData),并有另一個表 (myFileNo) 單值,這意味著單行、單列、單單元格 (FileNo),

I have a table (myData) with lots of columns and rows, and have another table (myFileNo) single value which means single row, single column, single cell (FileNo),

我寫了一個 sql 查詢,它通過檢查 myFileNo 更新 myData,并在進程結束后更改 FileNo 的值.

I wrote an sql query which updates myData by checking myFileNo, and after process ends it changes the value of FileNo.

將單值數據保存在表中對我來說沒有多大意義,這是正確的做法嗎?

It does not make much sense to me to keep the single value data in a table, is this the proper way to do it ?

FileNo 的目的

它充當標識號,但不像主鍵那樣創建.一個例子(之前和之后):

It acts as an identification number, but not created like a primary key. An example (before, and after):

之前

myData, FileNo
A, NULL
A, NULL
B, NULL
C, NULL
A, NULL
D, NULL
D, NULL

文件編號:15

之后

myData, FileNo
A, 16
A, 16
B, 17
C, 18
A, 16
D, 19
D, 19

FileNo: 19

推薦答案

如果 fileNo 被多個表和進程引用,然后將其存儲在一個表中就可以了,您可以調查擴展屬性,但我會保留放在桌子上.

In the case that the fileNo is being referenced by multiple tables and processes then storing it in a table is fine, you could investigate extended properties, but I would keep it in a table.

如果你只需要這個表并且你只需要能夠識別下一次加載的最大值+1,我建議你在插入之前檢查Max(FileNo),前提是這不會導致性能問題,基于表的大小.

If you only need it for this table and you only need to be able to identify the maximum value + 1 for the next load, I suggest you just check Max(FileNo) before inserting, providing this does not cause performance issues, based on the size of the table.

這篇關于在sql server中保留單個數據的正確方法?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Modify Existing decimal places info(修改現有小數位信息)
The correlation name #39;CONVERT#39; is specified multiple times(多次指定相關名稱“CONVERT)
T-SQL left join not returning null columns(T-SQL 左連接不返回空列)
remove duplicates from comma or pipeline operator string(從逗號或管道運算符字符串中刪除重復項)
Change an iterative query to a relational set-based query(將迭代查詢更改為基于關系集的查詢)
concatenate a zero onto sql server select value shows 4 digits still and not 5(將零連接到 sql server 選擇值仍然顯示 4 位而不是 5)
主站蜘蛛池模板: 国产成人精品一区二区三区四区 | 亚洲国产网站 | 中文字幕日韩在线 | 久久最新精品视频 | 91视频大全 | 午夜欧美 | 亚洲综合一区二区三区 | 99亚洲精品视频 | 日韩欧美三区 | 黄色毛片网站在线观看 | 日日夜夜精品免费视频 | 久久99这里只有精品 | 国产一区二区三区久久久久久久久 | 欧美老妇交乱视频 | 拍戏被cao翻了h承欢 | 亚洲人成在线观看 | 久久久精品久久 | 国产精品综合一区二区 | 久久99国产精一区二区三区 | 欧美不卡在线 | 中文字幕视频在线看5 | 日韩精品一区二区三区中文在线 | 精品伊人| 91精品国产高清一区二区三区 | 日韩喷潮| 在线视频91 | 亚洲激精日韩激精欧美精品 | 99精品视频在线 | 欧美天堂一区 | 亚洲国产精品日韩av不卡在线 | 天天干天天操天天爽 | 欧美一区二区免费 | 欧洲色综合 | 久久人爽爽人爽爽 | 波多野结衣一区二区三区在线观看 | 一区二区三区视频免费观看 | 国产精品久久久久久久久久尿 | 国产精品久久久久久久久免费丝袜 | 日韩精品一区二区三区免费观看 | 成人激情视频免费观看 | 日日操av |