#物美数据库系统为例,全量变价每隔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
#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...
#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...
#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(...
-----------------------------------
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...