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

更改 varchar 列的最大長度?

Changing the maximum length of a varchar column?(更改 varchar 列的最大長度?)
本文介紹了更改 varchar 列的最大長度?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我試圖在不丟失內(nèi)容的情況下將 varchar 列的長度從 255 個字符更新為 500 個字符.我之前刪除并重新創(chuàng)建了表,但我從未接觸過 alter 語句,我相信我需要使用它來執(zhí)行此操作.我在這里找到了文檔:ALTER TABLE (Transfact-SQL) 但是我不能讓它正面或反面.

I'm trying to update the length of a varchar column from 255 characters to 500 without losing the contents. 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. I found the documentation here: ALTER TABLE (Transfact-SQL) however I can't make heads or tails of it.

到目前為止,我有以下內(nèi)容(不幸的是,基本上沒有):

I have the following so far (essentially nothing unfortunately):

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

我該如何解決這個問題?是否有關(guān)于此語句的更好的文檔(我搜索了一些示例語句,但結(jié)果為空)?

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)?

推薦答案

您需要

ALTER TABLE YourTable ALTER COLUMN YourColumn <<new_datatype>> [NULL | NOT NULL]

但請記住,如果需要,請明確指定 NOT NULL.

But remember to specify NOT NULL explicitly if desired.

ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (500) NOT NULL;

如果你不指定如下...

If you leave it unspecified as below...

ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (500);

然后該列將默認允許空值,即使它最初定義為 NOT NULL.即省略 ALTER TABLE ... ALTER COLUMN 中的規(guī)范總是被視為.

Then the column will default to allowing nulls even if it was originally defined as NOT NULL. i.e. omitting the specification in an ALTER TABLE ... ALTER COLUMN is always treated as.

ALTER TABLE YourTable ALTER COLUMN YourColumn VARCHAR (500) NULL;

此行為不同于用于使用 ALTER TABLE(或在 CREATE TABLE 時間)創(chuàng)建的新列的行為.默認的可空性取決于 ANSI_NULL_DFLT設置.

This behaviour is different from that used for new columns created with ALTER TABLE (or at CREATE TABLE time). There the default nullability depends on the ANSI_NULL_DFLT settings.

這篇關(guān)于更改 varchar 列的最大長度?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

SQL trigger on Truncate(截斷時的 SQL 觸發(fā)器)
sql search query with multiple optional search parameters(具有多個可選搜索參數(shù)的 sql 搜索查詢)
SQL Efficiency: WHERE IN Subquery vs. JOIN then GROUP(SQL 效率:WHERE IN 子查詢 vs. JOIN 然后 GROUP)
Retrieving XML element name using t-SQL(使用 t-SQL 檢索 XML 元素名稱)
Insert double quotes into SQL output(在 SQL 輸出中插入雙引號)
Delete rows from CTE in SQL SERVER(從 SQL SERVER 中的 CTE 中刪除行)
主站蜘蛛池模板: 国产激情免费视频 | 在线欧美视频 | 噜噜噜色网 | 久久免费国产 | 久久国产精品-久久精品 | 日韩欧美国产一区二区 | 日韩α片| 亚洲午夜视频在线观看 | 欧美男男videos| 女人一区 | 国产精品亚洲成在人线 | 亚洲人久久 | 欧美伊人影院 | 欧美日韩在线观看一区 | 精品视频一区二区三区在线观看 | 91在线成人 | 成人在线视频免费观看 | 一区不卡在线观看 | 国产精品二区三区在线观看 | 亚洲欧美在线观看 | 亚洲最新网址 | 亚洲aⅴ | 天天曰夜夜 | 成人在线免费视频 | 日韩毛片免费看 | 国产精品日产欧美久久久久 | 免费一区二区三区 | 密桃av | 久久国产精品免费一区二区三区 | 亚洲欧美网站 | 国产成人免费一区二区60岁 | 亚洲精品国产成人 | 麻豆久久久9性大片 | 精品国产乱码久久久久久丨区2区 | 国产精品不卡一区 | 欧美视频一区二区三区 | 欧美人人| 超碰在线97国产 | www.奇米| 成人免费看黄网站在线观看 | 成人在线免费视频 |