动态语句基本语法:1 :普通SQL语句可以用exec执行Select * from tableName exec('select * from tableName')exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N2:字段名,...
分类:
数据库 时间:
2015-06-02 14:38:11
阅读次数:
295
查看表结构show columns from table_name from db_name;增加字段alter table suplychain_flashsale_orderdetail add column inferior_quantity int(11) not Null;...
分类:
数据库 时间:
2015-06-02 13:31:23
阅读次数:
143
oracle如何查看当前有哪些用户连接到数据库可以执行以下语句:select username,serial#, sid from v$session; ---查询用户会话alter system kill session 'serial#, sid ';---删除相关用户会话建议以后台登陆删除用户...
分类:
数据库 时间:
2015-06-02 13:20:55
阅读次数:
151
DescribeTwo bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They div...
分类:
其他好文 时间:
2015-06-02 12:58:58
阅读次数:
131
一:如果要插入目标表不存在:select * into 目标表 from 表 where ...二:如果要插入目标表已经存在:insert into 目的表 select * from 表 where 条件三:如果是跨数据库操作的话: 怎么把A数据库的atable表所查询的东西,全部插入到B 数据库...
分类:
数据库 时间:
2015-06-02 12:58:40
阅读次数:
139
例子:一个名为person的表,字段分别有name, age ,city,school,card,id 注意:sql是对大小写不敏感1.select : select name from person 查询出person表的所有name字段 select * from person 查询p...
分类:
数据库 时间:
2015-06-02 12:58:27
阅读次数:
143
--分组排序 select row_number() over(partition by C order by E DESC) no,a,b,c,d,e from t1--将分组排序的查询当作一张表查询,需要按照上面排序,可以自己修改,这里处理为所描述的降序,根据no判断,小于等于5的就是需要的数据...
分类:
其他好文 时间:
2015-06-02 12:53:36
阅读次数:
91
from django.shortcuts import renderfrom django import formsfrom django.http import HttpResponse, HttpResponseRedirectfrom django.contrib.auth import a...
分类:
其他好文 时间:
2015-06-02 12:47:53
阅读次数:
132
A Different Task
\epsfbox{p10795a.eps}
The (Three peg) Tower of Hanoi problem is a popular one in computer science. Briefly the problem is to transfer all the disks from peg-A to peg-C using peg-B a...
分类:
其他好文 时间:
2015-06-02 11:21:43
阅读次数:
139
保存
from save_ipython_variables import load_all_variables, save_variable
save_variable('pa_patmas', pa_patmas)
save_variable('dhc_workload', dhc_workload)
#put it into pickle for further use
读取
loa...
分类:
编程语言 时间:
2015-06-02 11:21:28
阅读次数:
248