更改 varchar 列的最大長度? - Changing the maximum length of a varchar column?

問題:

I'm trying to update the length of a varchar column from 255 characters to 500 without losing the contents.我試圖在不丟失內容的情況下將 varchar 列的長度從 255 個字符更新爲 500 個字符。 I've dropped and re-created tables before but I've never been exposed to the alter statement which is what I believe I need to use to do this.我之前刪除並重新創建了表,但我從未接觸過 alter 語句,我相信我需要使用它來執行此操作。 I found the documentation here: ALTER TABLE (Transfact-SQL) however I can't make heads or tails of it.我在這裏找到了文檔: ALTER TABLE (Transfact-SQL)但是我無法理解它。

I have the following so far (essentially nothing unfortunately):到目前爲止,我有以下內容(不幸的是,基本上沒有):

alter table [progennet_dev].PROGEN.LE
alter column UR_VALUE_3

How do I approach this?我該如何處理? Is there better documentation for this statement out there (I did some searches for an example statement but came up empty)?是否有關於此語句的更好的文檔(我搜索了一些示例語句,但結果爲空)?


解決方案:

參考一: https://en.stackoom.com/question/b2q5
參考二: https://stackoom.com/question/b2q5
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章