码迷,mamicode.com
首页 >  
搜索关键字:not exists    ( 4689个结果
全国城市选择器SQL
---- 表的结构 `wx_province`--DROP TABLE IF EXISTS `wx_province`;CREATE TABLE IF NOT EXISTS `wx_province` ( `id` smallint(5) unsigned NOT NULL auto_increm....
分类:数据库   时间:2014-09-15 19:09:59    阅读次数:876
python备份目录脚本
此脚本适用于备份指定发布目录下的目录,可适当修改运用!#!/usr/bin/envpython#backupapppythonscript.importosimporttimeimportsysnowTime=time.strftime("%Y%m%d")sourcePath=‘/home/zcb/resin-4.0.10/apps/‘backupPath=‘/home/zcb/tmp/bak‘+nowTimeifnotos.path.exists(‘/h..
分类:编程语言   时间:2014-09-15 11:29:19    阅读次数:266
事物的传播属性和隔离级别
1 事务的传播属性(Propagation)1) REQUIRED ,这个是默认的属性Support a current transaction, create a new one if none exists.如果存在一个事务,则支持当前事务。如果没有事务则开启一个新的事务。被设置成这个级别时,会...
分类:其他好文   时间:2014-09-15 11:16:18    阅读次数:218
[MySQL] 实现树形的遍历(关于多级菜单栏以及多级上下部门的查询问题)
前言:        关于多级别菜单栏或者权限系统中部门上下级的树形遍历,oracle中有connect by来实现,mysql没有这样的便捷途径,所以MySQL遍历数据表是我们经常会遇到的头痛问题,下面通过存储过程来实现。1,建立测试表和数据:DROP TABLE IF EXISTS csdn.channel;   CREATE TABLE csdn.channel (     id INT(1...
分类:数据库   时间:2014-09-15 01:07:18    阅读次数:383
plsql exist和in 的区别
发现公司同事很喜欢用exists和in做子查询关联,我觉得很有必要研究下两者的区别,供参考和备忘/*(这段信息来自网络begin)对于in的使用,就相当于对inner table执行一个带distinct的子查询,然后将得到的结果集再和outer table进行外连接,连接方式和索引使用任然同于普通...
分类:数据库   时间:2014-09-14 21:56:07    阅读次数:316
leetcode - Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-09-14 12:49:37    阅读次数:214
mysql left join,right join,inner join简单实例
-- 准备工作drop table if exists Emp;create table if not exists Emp( uid int primary key, sid int);insert into Emp values(1,1);insert into Emp values(2,2);...
分类:数据库   时间:2014-09-14 12:42:07    阅读次数:180
通过php下载文件并重命名
$filename = dirname(__FILE__) . '/oldfilename.jpg';$out_filename = 'newfilename.jpg';if( ! file_exists($filename)){ echo 'Not Found' . $filename; ex.....
分类:Web程序   时间:2014-09-13 17:15:35    阅读次数:281
TP之msubstr()
function msubstr($str, $start=0, $length, $charset="utf-8", $suffix=true) { ? ? ? ? if(function_exists("mb_substr")) ? ? ? ? ? ? $slice = mb_substr($str, $start, $length, $charset); ? ?...
分类:其他好文   时间:2014-09-13 10:47:55    阅读次数:190
MYSQL
CREATE DATABASE IF NOT EXISTS mydb DEFAULT CHARSET utf8 COLLATE utf8_general_ci;CREATE USER 'root'@'%' IDENTIFIED BY '123456';GRANT ALL PRIVILEGES ON ...
分类:数据库   时间:2014-09-12 22:03:14    阅读次数:285
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!