table USER
USER_ID ROLE_ID
admin admin USER_ID分布在table oFF或者FAC1 或者FAC2 中 也可能没有
user1 user
user2 user
user3 user
table ROLE
ROLE_ID ......
如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP
参考:http://hi.baidu.com/toiota/blog/item/ef105890249fa684a977a4dc.html
SQL code:
例子:
数据库TEST中存在表
mc ......
表A
declare @a table (a_xm varchar(6),a_time varchar(5),a_log varchar(1),a_rs int,a_ys int)
insert into @a
select '张三','06:00','q',1,7 union all
select '张三','07:00','f',2,8 union all
select '张三','08:00','q', ......
取总数:
Select SQL_BUFFER_RESULT count(col1) as all_ID from foods;
开始: start = 0
每页长度: page_length = 16
总页数: pages = all_ID/page_length
最后一页的记录数: odd = all_ID%page_length
查询当前页:
set @rownum=0;
select SQL_BUFFER_RESULT id,title,url,img,price
from f ......
C/C++ code:
char chSQL[1024] = {0};
MYSQL mysql;
strcat(chSQL, "select LOGIN_PWD from SYS_USER_TBL where LOGIN_NAME = '");
strcat(chSQL, chName);
strcat(chSQL, "'");
mysql_real_query(&mysql, chSQL, str ......
我有多条数据(至少20条),要从SQL数据库里面查出(字段A,字段B,字段C)导出,添加到ACCESS数据库里面(字段1,字段2,字段3)里面,我该如何查询,并添加,请指教!
创建一个到SQL SERVER的链接表,然后就可以直接复制了。
{{ ......