2015年10月12日
摘要: 为什么要使用存储过程通过把处理封装在一个易用的单元中,可以简化复杂的操作。1.由于不要求反复建立一系列处理步骤,因而保证了数据的一致性。(如果所有开发人员和应用程序都是用同一存储过程,则所有使用的代码都是相同的)防止错误保证了数据的一致性2.简化对变动的管理。如果表名、列名或者业务逻辑有变化,那么只... 阅读全文
posted @ 2015-10-12 17:24 baraka 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 为什么要使用视图:简化复杂的SQL操作,在编写查询后,可以方便地重用它而不必知道其基本查询细节。使用表的一部分而不是整个表。保护数据,可以授予用户访问表的特定部分的权限,而不是整个表的访问权限。更改数据格式和表示。视图可返回与底层表的表示和格式不同的数据。创建视图create view newspa... 阅读全文
posted @ 2015-10-12 14:40 baraka 阅读(260) 评论(0) 推荐(1) 编辑
  2015年10月11日
摘要: 自增长 增加时不需要对其设置值仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'nrc_type'中的标识列指定显式值。insert into nrc_type(t_name,t_memo) values('111','222');update nrc_type set ... 阅读全文
posted @ 2015-10-11 22:57 baraka 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 创建联结 select n_title,n_content,t_name,t_memo from nrc_news,nrc_type where nrc_news.t_id=nrc_type.t_id; select n_title,n_content,t_name,t_memo from nrc_... 阅读全文
posted @ 2015-10-11 20:53 baraka 阅读(282) 评论(0) 推荐(0) 编辑
摘要: select upper(n_id) from nrc_news;select left(n_content,1) from nrc_news;select len(n_content) from nrc_news;left() 返回字符串左边的字符len() 返回字符串的长... 阅读全文
posted @ 2015-10-11 19:17 baraka 阅读(207) 评论(0) 推荐(0) 编辑
摘要: select DISTINCT t_id from nrc_newsDISTINCT不会输出相同的值select top 5 * from nrc_news;检索前五行select * from nrc_news order by t_id;通过子列t_id排序注:指定一条order by子句时,... 阅读全文
posted @ 2015-10-11 15:42 baraka 阅读(201) 评论(0) 推荐(0) 编辑
  2015年10月2日
摘要: 阅读全文
posted @ 2015-10-02 00:51 baraka 阅读(349) 评论(0) 推荐(0) 编辑
  2015年9月27日
摘要: 无标题文档Snapshots山峦日出荷花雪林Choose an imageshowPic.jsfunction showPic(whichpic){ var source=whichpic.getAttribute("href"); var placeholder=document.getEleme... 阅读全文
posted @ 2015-09-27 23:49 baraka 阅读(131) 评论(0) 推荐(0) 编辑
  2015年9月25日
摘要: public class SimpleThread extends Thread{ private int countDown=5; private static int threadCount=0; public SimpleThread(){ super(Integer.toString(++... 阅读全文
posted @ 2015-09-25 22:50 baraka 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 线程的优先级将该线程的重要性传递给了调度器。尽管CPU处理现有线程集的顺序是不确定的,但是调度器将倾向于让优先权最高的线程先执行。import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;pub... 阅读全文
posted @ 2015-09-25 21:13 baraka 阅读(239) 评论(0) 推荐(0) 编辑