sql 语句总结
mysql : 将一个表的数据插入到newT 中
(newT 表须存在,且结构与select 语句对应的结构同 ,最好不用* 而是具体字段)
insert into newT select * from t1 where ...
也可以create table newT select f1,f2 from t1; (select into 的替代方法,mysql 不支持select into )
MySQL不支持Select Into
database table 的备份
mysqldump -uroot -proot -h192.101.111.111 databaseName [tableName] >a.sql
生成表结构及里面的所有数据
================================
可以用下列语句
source a.sql 重新导入
当然导入之前可以修改a.sql 里的内容,如表名,如此可实现备份
将数据备份,(不是导出sql 语句,而只导出 其中 的数据)
select * into outfile 'c:\out.txt' from tableName where ...;
对应的导入:
load data local infile 'c:\out.txt' into table positiondata fileds terminated by ';' (userid ,username );
相关文档:
SqlCommand com = new SqlCommand("select * from myuser where username=@UserName and password=@Pwd", con);
com.Parameters.Add(new SqlParameter("@UserN ......
Aaron Bertrand
Adam Machanic
All Things SQL Server
Allen Kinsel - SQL DBA
Allen White
Amit Bansal writes...
Andrew Fryer's Blog
Andrew Kelly
Andy Leonard
Anything and Everything IT
Arcane Code
Arnie Rowland: Ramblings of a Harried Technogeek
B.I. for the SQL Guy
Bart Duncan's SQL Weblog ......
ORACLE SQL性能优化
ORACLE SQL性能优化系列 (一)
1. 选用适合的ORACLE优化器
ORACLE的优化器共有3种:
a. RULE (基于规则) b. COST (基于成本) c. CHOOSE (选择性)
设置缺省的优化器,可以通过对init.ora文件中OPTIMIZER_MODE参数的各种声明,如RULE,COST,CHOOSE,ALL_ROWS,FIRST_ROWS . 你当然也在SQ ......
2005不论是性能还是安全性都是SQL SERVER2000有所增强,现有不少企业在使用2005,或是有的用户是2000与2005同时使用,那么这中间就涉及到双数据的转换问题:
今天我们就来看一下相关的实现方法:
本人的实现环境介绍:
方法一: 使用分离与附加 该方法适合于将SQL Server 2000中的数据转换到SQL Server2 ......
import java.sql.*;
public class JdbcUtil
{
public static void close(Statement st, Connection con)
{
try
{
&nb ......