sql语句循环变价脚本

#物美数据库系统为例,全量变价每隔2小时变价一次,循环1000次 declare @num smallmoney declare @n int set @num=1 set @n=0 while @n<100 begin update dbo.ElectronLable_HaLa_MerchInfo set RetailPrice=@num set @num = @num + 1 set @n=@n+1 waitfor delay '02:00:00' end
2016-11-21 22:07 | 阅读 1675 次 | 评论 0 条

mysql 笔记1

#mysql 的语句笔记 ---- #查询当前时间 mysql> select now(); +---------------------+ | now() | +---------------------+ | 2017-02-14 19:28:01 | +---------------------+ 1 row in set (0.02 sec) select * from hs_esl order by \c ctrl + u #sql语句中使用变量 “@” 设置变量 mysql> select @nam...
2016-07-24 20:33 | 阅读 71236 次 | 评论 0 条

python sqlite

#coding = utf-8 import sqlite3 #1、建立與數據庫的連接 db = '/usr/local/navicat/db.sqlite' connection=sqlite3.connect(db); #2、創建數據遊標 cursor=connection.cursor() #3、執行查詢語句 #cursor.execute("""select date('NOW')""") cursor.execute("select * from bind_li...
2016-07-03 13:55 | 阅读 11093 次 | 评论 0 条

python操作mysql

#coding = utf-8 import MySQLdb,sqlite3 def conmysql(sqlname,selectcmd): conn=MySQLdb.connect(host='localhost',user='root',passwd ='123456',port=3306,charset='utf8') conn.select_db(sqlname) #選擇數據庫 cur=conn.cursor() #cur.execute(...
2016-07-03 11:45 | 阅读 10596 次 | 评论 0 条

mysql

----------------------------------- create table biao1( stid smallint(4) zerofill primary key auto_increment, stname varchar(20), sex char(5), area char(50) )charset utf8 insert into stubase(stid,stname,sex,area) values (0001,"李小龙","男","中国香港"); insert into biao1(stid,s...
2016-04-02 15:29 | 阅读 10910 次 | 评论 0 条
浏览2343772次