-- SQL Server 2000SELECT a.name AS 字段名, CASE WHEN EXISTS (SELECT 1 FROM sysobjects WHERE xtype = 'PK' AND parent_obj = a.id AND name IN (SELECT name F...
分类:
数据库 时间:
2014-07-16 23:16:46
阅读次数:
294
if (Directory.Exists(path)) { string[] name = Directory.GetFiles(path); foreach (string item in name) { ...
分类:
其他好文 时间:
2014-06-27 18:44:08
阅读次数:
196
题目Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adja...
分类:
其他好文 时间:
2014-06-27 17:25:52
阅读次数:
225
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
其他好文 时间:
2014-06-27 12:46:45
阅读次数:
238
DELIMITER $$ #改动分隔符为 $$DROP PROCEDURE IF EXISTS sp_MvcCommonDataSource$$ #分隔符CREATE PROCEDURE sp_MvcCommonDataSource ( #输入參数 _fields VARCHAR(2000), #要...
分类:
数据库 时间:
2014-06-26 23:43:36
阅读次数:
309
Oracle查询优化中使用EXISTS可以比使用IN更加速度,当然这只能是在只有一个IN 的情况下,一般有多个IN的情况下,不能将所有的IN都换成EXISTS,道理我也不清楚,我只是根据实际情况的出来的结论。采用EXISTS+IN的模式:SELECT * FROM EXP_REPORT_HEADE....
分类:
数据库 时间:
2014-06-26 19:20:58
阅读次数:
258
一、注释: 1.单行注释#开始到行结束。 2.多行注释/* ... */。二、数据库存在性判断: 1.例如:如果数据库存在则删除 drop database if exists 数据库名; 2.例如:如果数据库不存在则创建 create database if not e...
分类:
数据库 时间:
2014-06-25 23:55:37
阅读次数:
329
题目
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
方法
...
分类:
其他好文 时间:
2014-06-24 19:36:55
阅读次数:
212
ovs-vsctl的DB的操作 如果你在命令行里面找不到相应的命令创建和删除对象,则可以直接删除数据库 [??if?exists] [??columns=column[,column]...] list table [record]... $ sudo ovs-vsctl list bridge _...
分类:
其他好文 时间:
2014-06-24 12:19:17
阅读次数:
372
在编写SQL语句时,如果要实现一张表有而另外一张表没有的数据时, 通常第一直觉的写法是:
select * from table1 where table1.id not in(select id from table2)
这种写法虽然看起来很直观,但是执行的效率会非常低下,在数据量很大的时候效果尤其明显,我们推荐使用not exists或左连接来代替。
select a.* from ta...
分类:
数据库 时间:
2014-06-22 16:36:50
阅读次数:
244