Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1380259
  • 博文数量: 247
  • 博客积分: 10147
  • 博客等级: 上将
  • 技术积分: 2776
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-24 15:18
文章分类

全部博文(247)

文章存档

2013年(11)

2012年(3)

2011年(20)

2010年(35)

2009年(91)

2008年(87)

我的朋友

分类:

2010-03-31 09:18:47

 
1.要求,自动登录mysql(root:root,passwd:123456),查询test库,test1表里的user=aa的记录.

#!/bin/sh
mysql -uroot -p123456 <use test;
select * from testaa while a=10000;     ###1000 not usr single quote mark,because a is int type,only char type need single quote mark.
EOF
2.拿oracle举个例子:
su - oracle -c sqlplus <sys/sys as sysdba
spool /res.lst
selec * from test;
spool off
exit
!
阅读(3792) | 评论(0) | 转发(0) |
0

上一篇:[转]Shell命令替換

下一篇:rpm 常用命令

给主人留下些什么吧!~~