Dragon in the sky

whatever happened , go ahead! Happy life of big pig and its dog.
随笔 - 99, 文章 - 1, 评论 - 31, 阅读 - 16万
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  SqlServer

摘要:A database is always in one specific state. For example, these states include ONLINE, OFFLINE, or SUSPECT. To verify the current state of a database, select the state_desc column in the sys.databases ... 阅读全文

posted @ 2009-12-11 15:31 龙泰 阅读(216) 评论(0) 推荐(0) 编辑

摘要:数据库系统的三级模式结构是指数据库系统是由模式、外模式和内模式三级构成的。 (1)模式 模式也称逻辑模式或概念模式,是数据库中全体数据的逻辑结构和特征的描述,是所有用户的公共数据视图。 模式实际上是数据库数据在逻辑级上的视图。一个数据库只有一个模式。定义模式时不仅要定义数据的逻辑结构,而且要定义数据之间的联系,定义与数据有关的安全性、完整性要求。 (2)外模式 外模式也称用户模式,它是数据库用户能... 阅读全文

posted @ 2009-09-28 15:28 龙泰 阅读(846) 评论(0) 推荐(0) 编辑

摘要:Procedure can return zero or n values whereas function can return one value which is mandatory. Procedures can have input,output parameters for it whereas functions can have only input parameters. P... 阅读全文

posted @ 2009-09-28 15:15 龙泰 阅读(152) 评论(0) 推荐(0) 编辑

摘要:事务处理 事务是一组组合成逻辑工作单元的数据库操作,在系统执行过程中可能会出错,但事务将控制和维护每个数据库的一致性和完整性。事务处理的主要特征是,任务要么全部完成,要么都不完成。在写入一些记录时,要么写入所有记录,要么什么都不写入。如果在写入一个记录时出现了一个失败,那么在事务处理中已写入的其他数据就会回滚。事务可能由很多单个任务构成。 简单事务的一个常见例子:把钱从A账户转到B账户,这涉及两项... 阅读全文

posted @ 2009-09-26 17:36 龙泰 阅读(164) 评论(0) 推荐(0) 编辑

摘要:1.SQL插入语句得到自动生成的递增ID值 insert into Table1(Name,des,num) values ('ltp','thisisbest',10); select @@identity as 'Id' 2.实现是1或0想显示为男或女 select name,Sex= case Sex when '1' then '男' when '0' then '女' end fr... 阅读全文

posted @ 2009-09-26 14:32 龙泰 编辑

摘要:What are the difference between DDL, DML and DCL commands? Submitted by admin on Wed, 2004-08-04 13:49 DDLData Definition Language (DDL) statements are used to define the database structure or schema... 阅读全文

posted @ 2009-09-24 11:18 龙泰 阅读(294) 评论(0) 推荐(0) 编辑

摘要:You may have seen Transact-SQL code that passes strings around using an N prefix. This denotes that the subsequent string is in Unicode (the N actually stands for National language character set). Whi... 阅读全文

posted @ 2009-09-24 10:18 龙泰 阅读(587) 评论(0) 推荐(0) 编辑

摘要:注意:这里说的delete是指不带where子句的delete语句 相同点 truncate和不带where子句的delete, 以及drop都会删除表内的数据 不同点: 1. truncate和 delete只删除数据不删除表的结构(定义) drop语句将删除表的结构被依赖的约束(constrain),触发器(trigger),索引(index); 依赖于该表的存储过程/函数将保留,但是变为i... 阅读全文

posted @ 2009-09-18 18:16 龙泰 阅读(169) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示