This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--2.次に全カラムの設定変更 | |
select | |
'ALTER TABLE ' | |
+ so.name | |
+ ' ALTER COLUMN ' | |
+ sc.name | |
+ ' ' | |
+ st.name | |
+ '(' | |
+ convert(varchar,sc.length) | |
+ ') COLLATE Japanese_CS_AS_KS_WS ' | |
+ case when sc.isnullable = 0 then 'NOT NULL' else '' end as "全カラムの設定変更" | |
from sysobjects so | |
join syscolumns sc on so.id=sc.id | |
join systypes st on sc.xtype=st.xtype | |
where so.type='U' | |
and so.name like 'TEST_%' | |
and st.name in ('char', 'varchar') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment