加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

用perl操作mysql数据库的脚本

发布时间:2020-12-16 00:24:53 所属栏目:大数据 来源:网络整理
导读:自己的记录 努力学perl中 #!/usr/bin/perl?-w? use?strict;? use?DBI;? my?$ dbh = DBI - connect("DBI:mysql:hlgmall","root","123456");? print?"create?table?xx?select?*?from?es_user_role";? my?$ sth =$dbh- prepare("create?table?ll?select?*?from?

自己的记录 努力学perl中

 
 
  1. #!/usr/bin/perl?-w?
  2. use?strict;?
  3. use?DBI;?
  4. my?$dbh=DBI->connect("DBI:mysql:hlgmall","root","123456");?
  5. print?"create?table?xx?select?*?from?es_user_role";?
  6. my?$sth=$dbh->prepare("create?table?ll?select?*?from?es_user_role");?
  7. $sth->execute();?
  8. $sth->finish;?
  9. my?$sth1=$dbh->prepare("create?table?hh?select?*?from?es_user_role");?
  10. $sth1->execute();?
  11. $sth1->finish;?
  12. $dbh->disconnect();?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读