易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL Server 数据格式修改时,没有保存按钮的情况解决

如果你使用的是 SQL Server 2008, 当你修改数据结构后,保存时会报下图情况: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created. 这是 SQL Server 2008 的一种自我保护,当你的修改可能导致数据表被删除并重新创建时(dropped and re-created),就会有这个提醒。 导致表被重新创建可能是以下几种情况: 在表中间添加一个新列; 删除列 更改列为 Null 性 更改列的顺序 更改列的数据类型 若要不使用这个保护,需要在“工具”菜单中单击“选项”,展开“设计器”,然后单击“表设计器和数据库设计器”。 清除“阻止保存要求重新创建表的更改”复选框。 on the Tools menu, click Options, expand Designers, and then click Table and Database Designers. Select or clear the Prevent saving changes that require the table to be re-created check box. 如下图: 参考资料: Save (Not Permitted) Dialog Box
http://msdn.microsoft.com/en-us/library/bb895146.aspx


相关文档:

SQL Server 压缩日志空间

使用了一段时间后,SQL Server 的 LDF文件体积巨大.
如何处理嘞, 对于 SQL Server 2005 及之前的版本,可以使用如下 SQL:
declare @name varchar(50)
set @name='dbname
'
backup
log @name
with truncate_only
dbcc shrinkdatabase (@name,20)
可是在 SQL Server 2008 开始,执行上面的语句会报错:
'truncate ......

Qt数据库(四)利用QSqlQuery类执行SQL语句(二)


本文章原创于www.yafeilinux.com 转载请注明出处。
接着上一篇教程。
二,在SQL语句中使用变量。
我们先看下面的一个例子,将“查询”按钮的槽函数更改如下:
void Widget::on_pushButton_clicked()
{
    QSqlQuery query;
    query.prepare(“insert i ......

oracle常用sql语句

修改列属性
alter table tablename modify(name ,varchar2(10)) 列宽度不得小于修改前的宽度
日志管理
视图 v$logfile
alter database add logfile 'd:\orcl01.log' size 10m;//添加组
alter database add logfile member 'd:\orcl02.log' to group 4;//向4组中添加成员
alter database drop logfile member 'd: ......

Oracle如何执行批量sql语句

要创建两个文件
1: runBatch.bat
2: sql.txt
runBatch.bat 内容如下:
sqlplus username/password @sql.txt
pause
sql.txt内容如下:
spool sql.log
create table t1(cname char(20));
insert into t1(cname) values('test');
select * from t1;
spool off
exit
双击runBatch.bat就可以批量执行sql.txt中 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号