久久久久久久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 的目的

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

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模板網!

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

相關文檔推薦

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)
主站蜘蛛池模板: 亚洲iv一区二区三区 | 精品成人 | 91精品久久久久久久久久 | 国产成人精品午夜 | 日韩成人免费av | 亚洲区一区二 | 精品中文字幕一区 | 精精国产xxxx视频在线野外 | 国产伦精品一区二区三区高清 | 视频国产一区 | 国产精品亚洲第一区在线暖暖韩国 | 午夜tv免费观看 | 欧美综合一区 | 久久这里只有精品首页 | 孕妇一级毛片 | 国产精品一二三区在线观看 | 国产精品国产精品国产专区不卡 | 亚洲品质自拍视频网站 | 成人亚洲| 青草青草久热精品视频在线观看 | 日韩av在线一区二区 | 国产高清精品一区二区三区 | 久久久久久网站 | 亚洲午夜一区二区 | 在线午夜电影 | 欧美www在线观看 | 99精品在线| 日本 欧美 国产 | 在线观看亚洲专区 | 不卡视频一区二区三区 | 91精品国产一区二区三区 | 成人国产精品久久久 | 色婷婷av一区二区三区软件 | 91一区二区 | 精品亚洲一区二区三区四区五区高 | 国产激情91久久精品导航 | 亚洲男女视频在线观看 | 99国产精品久久久 | 欧美成年人视频在线观看 | 噜噜噜噜狠狠狠7777视频 | 在线视频a |