怎么把powerdesigner导出的sql用PHP导入MysQL数据库
我们知道用powerdesigner导出的sql文件后缀为'.sql';用phpmyadmin很容易导入MysQL数据库,但是用PHP怎么导入数据库呢?
我用powerdesigner设计一个数据库后导出sql文件(一个投票系统)为'vote.sql';
文件内容为(一些sql语句和注释):
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2010-4-22 17:11:50 */
/*==============================================================*/
drop table if exists account_charge;
drop table if exists account_cost;
drop table if exists account_info;
drop table if exists charge_way;
drop table if exists user_askanswer;
drop table if exists user_info;
drop table if exists vote_fake;
drop table if exists vote_info;
drop table if exists vote_item;
drop table if exists vote_title;
drop table if exists vote_type;
/*==============================================================*/
/* Table: account_charge */
/*==============================================================*/
create table account_charge
(
chargeid int not null,
chargewayid int not null,
accountid
相关文档:
<?php
* xCopy("feiy","feiy2",1):拷贝feiy下的文件到 feiy2,推销员的一天,包括子目录
*参数说明:
* $destination:目的目录名
......
PL/SQL-FOR UPDATE 与 FOR UPDATE OF的区别
url:http://hi.baidu.com/1413/blog/item/a521251f7e5993c4a686696b.html
数据库 oracle for update of 和 for update区别
select * from TTable1 for update 锁定表的所有行,只能读不能写
2 select * from TTable1 wher ......
哎,还是上周的事情了,csdn的博客最近咋老是打不开呢!
基本语句:Alter table 表名 drop Column 字段名
另单单是这样是不行滴,还要删除对应的关系滴。下面就把查找到的那篇文章引用下吧!
原文地址:http://hi.baidu.com/lisky119/blog/item/3c348c082573949c0a7b82d1.html
SET ANSI_NULLS ON
GO
SET QUOTED_IDENT ......
本译文采用知识共享署名-非商业性使用-相同方式共享 3.0 Unported许可协议发布,转载请保留此信息
译者:马齿苋 | 链接:http://www.dbabeta.com/2010/oracle-sql-server-comparison-i.html
作者:Sadequl Hussain | 原文:http://www.sql-server-performance.com/articles/dba/oracle_sql_server_comparison_p1.aspx
一 ......
begin
for item in (select * from user_constraints a where a.constraint_type = 'R') loop
execute immediate 'alter table ' || item.table_name || ' disable constraint ' || item.constraint_name;
end loop;
end;
/ ......