#-*- coding:UTF-8 -*-# 导入SQLite驱动:import sqlite3# 连接到SQLite数据库# 数据库文件是test.db# 如果文件不存在,会自动在当前目录创建:conn = sqlite3.connect('test.db')# 创建一个Cursor:cursor...
分类:
数据库 时间:
2014-07-16 19:59:59
阅读次数:
220
基础数据表:select * from dbo.RecommendationChanelVersionRelation;数据如下:要求按照ChannelVersionID分组,对每组中的OrderId根据ID由小到大的顺序,更新为1,2,3,4,5...方法一(分组PARTITION BY):IF ...
分类:
其他好文 时间:
2014-07-13 11:30:35
阅读次数:
226
1. Set Serveroutput on; declare Cursor tem_cursor is select * from xuesheng xs; v_row tem_cursor%rowtype;begin open tem_...
分类:
数据库 时间:
2014-07-13 00:35:28
阅读次数:
195
情况:在远程数据库删除表执行太慢,表过多,数据库无权删除结果:保留空数据库方法:利用sql语句,查询网络文摘解决.说明:有些有约束,不能直接delete,需要先删除所有约束,语句:DECLARE c1 cursor for select 'alter table ['+ object_name...
分类:
数据库 时间:
2014-07-12 15:23:17
阅读次数:
231
例子table1结构如下id intname varchar(50)declare @id intdeclare @name varchar(50)declare cursor1 cursor for --定义游标cursor1select * from table1 ...
分类:
其他好文 时间:
2014-07-11 12:57:38
阅读次数:
214
我采用的是MySQLdb操作的MYSQL数据库。先来一个简单的例子吧:importMySQLdb
try:
conn=MySQLdb.connect(host=‘localhost‘,user=‘root‘,passwd=‘root‘,db=‘test‘,port=3306)
cur=conn.cursor()
cur.execute(‘select*fromuser‘)
cur.close()
conn.close()
exceptMySQLdb.Error,e..
分类:
数据库 时间:
2014-07-10 18:20:40
阅读次数:
282
注意部分:canvas的height和width不能再css中设定,应该在html中设定,否则会影响页面的分辨率。效果图:图1:代码css:#canvas{ cursor: crosshair;}button{ width: 80px;}.yellowBtn{ background...
分类:
其他好文 时间:
2014-07-08 22:31:32
阅读次数:
223
以基本的学生选课为例,建立选课数据库,学生、班级、选课信息三张表,并分别对表进行插删改操作:importMySQLdb
try:
conn=MySQLdb.connect(host=‘localhost‘,user=‘root‘,passwd=‘root‘,db=‘xuanke‘,port=3306)
cur=conn.cursor()
cur.execute("CREATEDATABASExuanke")
..
分类:
数据库 时间:
2014-07-08 08:05:43
阅读次数:
479
DECLARE @TableName VARCHAR(119)DECLARE @TableID INTDECLARE @ColName VARCHAR(111)DECLARE Table_Cursor CURSOR FOR SELECT [name],id FROM sysobjects WHERE...
分类:
数据库 时间:
2014-07-06 15:11:47
阅读次数:
280
bootsect部分已经执行完成,程序也跳转到setup部分:
start:
! ok, the read went well so we get current cursor position and save it for
! posterity.
mov ax,#INITSEG ! this is done in bootsect already, but...
mov...
分类:
系统相关 时间:
2014-07-03 18:38:19
阅读次数:
329