ISSUE 1: Incorrect syntax near 'GO'.
replace GO with ;
1) GO is a keyword for Query Analyzer, not belongs to T-SQL. So, if you don't use Query Analyzer, GO is not recoganized.
2) GO instructs Query Analyzer to interpret and run the preceding T-SQL statments.
ISSUE 2: Incorrect syntax near the keyword 'DEFAULT'
You can't simply alter a column like this :
ALTER TABLE GreenscopeUser ALTER COLUMN Enabled nChar(1) not null DEFAULT 'Y';
You should alter the column like this:
ALTER TABLE GreenscopeUser ALTER COLUMN Enabled nChar(1) not null;
ALTER TABLE GreenscopeUser ADD CONSTRAINT default_Enabled DEFAULT 'Y' FOR Enabled;
Also please don't forget the remove all constraints on this column before you change it.
分享到:
相关推荐
`SqlServer GroupConcat`的CLR实现是为了解决SQL Server中缺乏类似MySQL `GROUP_CONCAT`功能的问题。CLR(Common Language Runtime)是.NET框架的一部分,允许开发者使用各种编程语言(如C#、VB.NET等)编写存储过程...
Sander Rossel will take readers through common pitfalls, why databases run slowly, how to troubleshoot performance issues, and how to test and deploy SQL Server databases. The first half of SQL ...
Inside Microsoft SQL Server 2008: T-SQL Querying puts together all the ingredients you need to understand this declarative and set-oriented way of thinking and become a profi cient SQL programmer, ...
Techniques to troubleshoot common issues that you may face during and after deploying availability groups in a mission-critical production environment. What You Will Learn Grasp important concepts ...
All these issues that occur on the back-end SQL Server instance frustrate users, and organizations don’t usually have the database administrator (DBA) skill set in-house to fix these performance ...
### SQL Server DMVs 实战:深入理解与应用 #### 一、引言 自2005年以来,动态管理视图(Dynamic Management Views,简称DMVs)已成为SQL Server性能监控的核心工具之一。对于希望成为数据库管理员(DBA)或优秀数据库...
Some great approaches to common problems, some great forays into areas I have, unfortunately, not forced myself to get into (like Power Shell for my administrative tasks). I will be taking some of the...
Analyze the output of blocking scripts and Microsoft® SQL Server™ Profiler to troubleshoot locking and blocking issues. Formulate hypothesis to resolve locking and blocking issues. ...
Inside Microsoft SQL Server 2008: T-SQL Querying puts together all the ingredients you need to understand this declarative and set-oriented way of thinking and become a profi cient SQL programmer, ...
transformations, and XPath, plus extensive discussion of data access issues such as synchronization and serialization, the DiffGram format, and the XML extensions in Microsoft SQL Server™ 2000....
you'll discover how to plan, design, deploy, and manage strategic solutions using SharePoint 2010, Microsoft SQL Server®, Windows PowerShell™, and other key technologies. Topics include ...
Important: If installing ODAC into an existing Oracle 12c home, review the "Common Install and Setup Issues" section of the ODAC installation instructions. This download includes: Oracle Developer ...
- **Identifying and Resolving Deployment Issues (Chapter 1-3, Lessons 1-2):** Troubleshooting common deployment issues and resolving them effectively. ##### **Implementing an SSAS Solution** - **...
Forms, Microsoft(R) SQL Server(R), Web services, and console applications. You’ll get hands-on instruction and extensive C# code samples to help you tackle the tough topics and develop high-...