---
title: "The 'select into' database option is not enabled for database ***"
author: "winnie825"
date: "2013-03-19T17:18:36Z"
tags: []
categories: ["数据库"]
slug: "the-select-into-database-option-is-not-enabled-for-database"
draft: false
lastmod: "2013-03-19T17:18:36Z"
id: 1831997
url: "https://winnie825.iteye.com/blog/1831997"
---

在sybase进行列更新语句时，可能会遇到这样的错误

```
无法执行语句。
The 'select into' database option is not enabled for database '#TABLE_NAME#'.
ALTER TABLE with data copy cannot be done. Set the 'select into'
database option and re-run.
Sybase 错误代码=11052
Severity Level=16, State=1, Transaction State=1
第 2 行

alter table #TABLE_NAME# modify #COLUM# varchar(100)
```

 

错误产生的原因是sybase数据库没有赋予当前库执行select into的权限，修改方法有两种：

1\. 如果仅是偶尔执行alert语句，可以先执行以下sql：

```
use master
go
exec sp_dboption '#DB_NAME#', 'select into', 'TRUE'
go
```

 2. 修改数据实例属性，赋予select into等权限：

![](http://dl.iteye.com/upload/attachment/0081/8827/9bcf0f73-804e-3059-8829-4ba9d3593685.jpg)