随笔分类 - 数据库
摘要:查看表是否死锁 select * from master..SysProcesses where db_Name(dbID) = '数据库名' and spId <> @@SpId and dbID <> 0 and blocked >0; 或者 select request_session_id
阅读全文
摘要:数据库创建 创建数据表 create table ( 字段1 字段类型 not null , 字段2 字段类型 ) primary key() 删除数据表 drop table 表名 增加字段 alter table xxx add 列名 类型 修改字段类型或长度 alter table 表 alt
阅读全文
摘要:准备基础数据 CREATE TABLE [dbo].[person_info]( [name_person] [varchar](32) NULL, [age] [int] NULL, [address] [varchar](128) NULL ) ON [PRIMARY] insert into
阅读全文
摘要:准备基本的数据 create table test_table ( id int identity(0,1), name varchar(20), age int, book_name varchar(50), price float ) insert into test_table values
阅读全文

浙公网安备 33010602011771号