#!/bin/csh if ($#argv != 1 ) then echo 'Usage:csh deltmp.sh [dbname]'; exit(0); else if ($#argv == 1 ) then set dbname='$argv[1]'; endif rm deltmp*.sql echo 'now load tmp table to deltmp.sql' dbaccess $dbname <<EOF unload to 'deltmp.sql' select tabname from systables where tabname like 'tmp%' and created < extend(current,year to day) EOF echo 'load finish' echo '| -->' sed 's/|/;/w deltmp1.sql' deltmp.sql echo 'tmp -->drop table tmp' sed 's/tmp/drop table tmp/w deltmp2.sql' deltmp1.sql echo 'delete temp table' dbaccess $dbname deltmp2.sql echo 'delele temp files' rm deltmp*.sql
可以进行批量表删除的Informix数据库脚本
浏览:21日期:2023-09-09
一个用于Informix数据库批量删除临时表的脚本:
相关文章:
热门推荐

- Golang 如何判断数组某个元素是否存在(isset)
- 1.IE6中a标签同时使用inline-block与text-indent时出现的BUG
- 2.Golang 使用map需要注意的几个点
- 3.怎么解决360双核浏览器兼容模式的页面显示问题?解决的方法介绍
- 4.intellijidea导入eclipse工程详细步骤
- 5.构建Golang应用最小Docker镜像的实现
- 6.IE6的双倍,3px,注释引起的文字错位等几个BUG解决方法
- 7.IE浏览器在post提交时中文乱码是什么原因?解决方法介绍
- 8.用0-9之间的四个数求24的算法
- 9.用ASP.NET开发Web服务的五则技巧
- 10.phpwind漏洞利用终结篇
