1. 为什么数据库中的表不能修改了
数据库设置里面。你修改下属性。找到去掉此提示的一个方法,打开SQL2008在最上面工具-〉选项-〉左侧的Designer-〉表设计器和数据库设计器->阻止保存要求重新创建表的更改(右侧)把钩去掉即可。
2. 在数据库中如何修改数据表内的数据
EXCEL工作表保护密码破解
方法:
1\打开文件
2\工具---宏----录制新宏---输入名字如:aa
3\停止录制(这样得到一个空宏)
4\工具---宏----宏,选aa,点编辑按钮
5\删除窗口中的所有字符(只有几个),替换为下面的内容:(复制吧)
6\关闭编辑窗口
7\工具---宏-----宏,选AllInternalPasswords,运行,确定两次,等2分钟,再确定.OK,没有密码了!!
内容如下:
Public Sub AllInternalPasswords()
' Breaks worksheet and workbook structure passwords. Bob McCormick
' probably originator of base code algorithm modified for coverage
' of workbook structure / windows passwords and for multiple passwords
'
' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
' Modified 2003-Apr-04 by JEM: All msgs to constants, and
' eliminate one Exit Sub (Version 1.1.1)
' Reveals hashed passwords NOT original passwords
Const DBLSPACE As String = vbNewLine & vbNewLine
Const AUTHORS As String = DBLSPACE & vbNewLine & _
"Adapted from Bob McCormick base code by" & _
"Norman Harker and JE McGimpsey"
Const HEADER As String = "AllInternalPasswords User Message"
Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
Const REPBACK As String = DBLSPACE & "Please report failure " & _
"to the microsoft.public.excel.programming newsgroup."
Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
"now be free of all password protection, so make sure you:" & _
DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
DBLSPACE & "Also, remember that the password was " & _
"put there for a reason. Don't stuff up crucial formulas " & _
"or data." & DBLSPACE & "Access and use of some data " & _
"may be an offense. If in doubt, don't."
Const MSGNOPWORDS1 As String = "There were no passwords on " & _
"sheets, or workbook structure or windows." & AUTHORS & VERSION
Const MSGNOPWORDS2 As String = "There was no protection to " & _
"workbook structure or windows." & DBLSPACE & _
"Proceeding to unprotect sheets." & AUTHORS & VERSION
Const MSGTAKETIME As String = "After pressing OK button this " & _
"will take some time." & DBLSPACE & "Amount of time " & _
"depends on how many different passwords, the " & _
"passwords, and your computer's specification." & DBLSPACE & _
"Just be patient! Make me a coffee!" & AUTHORS & VERSION
Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
"Structure or Windows Password set." & DBLSPACE & _
"The password found was: " & DBLSPACE & "$$" & DBLSPACE & _
"Note it down for potential future use in other workbooks by " & _
"the same person who set this password." & DBLSPACE & _
"Now to check and clear other passwords." & AUTHORS & VERSION
Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
"password set." & DBLSPACE & "The password found was: " & _
DBLSPACE & "$$" & DBLSPACE & "Note it down for potential " & _
"future use in other workbooks by same person who " & _
"set this password." & DBLSPACE & "Now to check and clear " & _
"other passwords." & AUTHORS & VERSION
Const MSGONLYONE As String = "Only structure / windows " & _
"protected with the password that was just found." & _
ALLCLEAR & AUTHORS & VERSION & REPBACK
Dim w1 As Worksheet, w2 As Worksheet
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
Dim PWord1 As String
Dim ShTag As Boolean, WinTag As Boolean
Application.ScreenUpdating = False
With ActiveWorkbook
WinTag = .ProtectStructure Or .ProtectWindows
End With
ShTag = False
For Each w1 In Worksheets
ShTag = ShTag Or w1.ProtectContents
Next w1
If Not ShTag And Not WinTag Then
MsgBox MSGNOPWORDS1, vbInformation, HEADER
Exit Sub
End If
MsgBox MSGTAKETIME, vbInformation, HEADER
If Not WinTag Then
MsgBox MSGNOPWORDS2, vbInformation, HEADER
Else
On Error Resume Next
Do 'dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
With ActiveWorkbook
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If .ProtectStructure = False And _
.ProtectWindows = False Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND1, _
"$$", PWord1), vbInformation, HEADER
Exit Do 'Bypass all for...nexts
End If
End With
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
If WinTag And Not ShTag Then
MsgBox MSGONLYONE, vbInformation, HEADER
Exit Sub
End If
On Error Resume Next
For Each w1 In Worksheets
'Attempt clearance with PWord1
w1.Unprotect PWord1
Next w1
On Error GoTo 0
ShTag = False
For Each w1 In Worksheets
'Checks for all clear ShTag triggered to 1 if not.
ShTag = ShTag Or w1.ProtectContents
Next w1
If ShTag Then
For Each w1 In Worksheets
With w1
If .ProtectContents Then
On Error Resume Next
Do 'Dummy do loop
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
.Unprotect Chr(i) & Chr(j) & Chr(k) & _
Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
If Not .ProtectContents Then
PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
MsgBox Application.Substitute(MSGPWORDFOUND2, _
"$$", PWord1), vbInformation, HEADER
'leverage finding Pword by trying on other sheets
For Each w2 In Worksheets
w2.Unprotect PWord1
Next w2
Exit Do 'Bypass all for...nexts
End If
Next: Next: Next: Next: Next: Next
Next: Next: Next: Next: Next: Next
Loop Until True
On Error GoTo 0
End If
End With
Next w1
End If
MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation, HEADER
End Sub
3. 数据表不能进行修改数据的操作
当你双击进入了数组公式后,即使不对数组公式做任何修改,退出时它都会跳出“不能修改数组的谋一部分”的提示语。你可以通过以下方法解决:
1;如果原有数组公式没有改变,你可以直接按“CTRL"+"SHIFT"+"ALT",退出或完成编辑。
2;如果你删除了原有的公式却无法返回时,你可以按““CTRL"+"A",此时会出现个“=”图标在光标所处的表格中,然后你可以在“名称框(在“编辑栏”的左边)”中任意选择一个函数计算(英文的那些),如:SUM;TRANSPOSE;SQRT......选哪个都可以。单击一个后会跳出一个编辑对话框,此时你单击“取消”,就可以退出啦!
4. 数据库表怎么修改
5.6以后新增了online-DDL功能,但是好像用的人不多,感兴趣可以研究下。目前来说普遍的方案还是采用percona的pt-online-schema-change>Download Percona Toolkit
pt-osc是在这个Toolkit包中的,原理来说在进行表结构的修改的时候,会先建立一个临时的表,然后进行原表的数据拷贝与结构修改,与此同时会在原表上建立触发器(update,insert,delete),把数据同步到临时表上,当临时表修改完毕后,最后进行一下表明的更改,所以理论上锁表的时间会很短。
5. 修改数据库中表的数据
update 表名 set checktime=replace(cast(checktime as varchar(20)),substring(cast(checktime as varchar(20)),1,10),'2009-3-2' ) 绝对能该没一点问题,如果你只想把指定时间改为2009-3-2,则只需把上面substring(cast(checktime as varchar(20)) 改为指定日期如:2010-10-11
6. 表格数据怎么不被修改
1、打开excel表格,选中所需要锁定的单元格,点击鼠标右击,会有下拉菜单并点击“设置单元格格式”。
2、在“设置单元格格式”窗口里点击“保护”,勾选“锁定”功能,再点击“确定”即可。
3、点击“视图”,点击“保护工作表”,会跳出“保护工作表”的窗口,输入密码之后点击“确定”,再次重新输入密码之后再次点击“确定”即可锁定内容不被修改。
7. 为什么数据库中的表不能修改了呢
AutoNumber字段:AutoNumber数据类型的特点是,该字段类型经常用作记录的标识号或主键,在开始添加新记录时,Access会自动填充该字段的值,并且是不可修改的。
计算字段:在Access数据库中计算字段显示经Access计算所得的值。它们通常根据表中其他的字段得到,但计算字段并不存储在表中,所以说计算字段是不可编辑的。
8. 为什么sql表格不能修改
ALTER TABLE 语句
ALTER TABLE 语句用于在已有的表中添加、修改或删除列。
SQL ALTER TABLE 语法
如需在表中添加列,请使用下列语法:
ALTER TABLE table_name
ADD column_name datatype
要删除表中的列,请使用下列语法:
ALTER TABLE table_name
DROP COLUMN column_name
注释:某些数据库系统不允许这种在数据库表中删除列的方式 (DROP COLUMN column_name)。
要改变表中列的数据类型,请使用下列语法:
ALTER TABLE table_name
ALTER COLUMN column_name datatype
9. mysql无法修改表的数据
mysql修改语句如下:
1、修改表名
用法:alter table 旧表名 rename 新表名;
mysql> alter table TYPE rename type;
2、修改表的列名
用法:alter table 表名 change 旧表名 新表名 类型;
mysql> alter table type change name type_name varchar(30) not null;
3、修改表某一列的类型
用法:alter table 表名 modify 列名 类型;
mysql> alter table type modify type_name varchar(100);
4、增加一列
用法:alter table 表名 add 列名 类型;
mysql> alter table type add age int(11);
5、删除一列
用法:alter table type drop 列名;
mysql> alter table type drop age;
10. 数据库表不能修改数据
出现错误原因:在创建表时修改了表中的内容,数据库防止随意修改数据库中的信息,所以对修改进行了保护。错误提示中可以看出我们勾选了“阻止保存要求重新创建表的更改”这个选项,当时数据库检测到我们修改了表中的数据时,就会阻止我们保存
调整方法:工具--选项--设计器--表设计器和数据库设计器--取消“阻止保存要求重新创建标的更改”选项,这么简单就Ok啦,所以遇到问题不要怕哟,耐下心来分析一下原因就好啦。
- 相关评论
- 我要评论
-