修改表1.怎么在已经创建的表中插入一列ALTER TABLE table-name ADD COLUMN column-name column-type 例如在student表中添加一列名为name,类型为varchar:alter table student add column name var...
分类:
数据库 时间:
2014-11-20 11:45:10
阅读次数:
198
Dealing with large data sets makes it necessary to pick out only the newest or the hottest elements and not displaying everything. In order to have ol...
分类:
数据库 时间:
2014-11-20 11:38:12
阅读次数:
163
To understand how the write-ahead log works, it is important for you to know how modified data is written to disk. SQL Server maintains a buffer cache...
分类:
数据库 时间:
2014-11-20 11:36:23
阅读次数:
160
本文由秀依林枫提供友情赞助,首发于烂泥行天下。 上一篇文章,我们讲解了如何通过mysql的binlog日志恢复mysql数据库,文章连接为《烂泥:通过binlog恢复mysql数据库》。其中我们提到了的备份数据库要晚与要恢复的数据库时间,即要恢复的数据库在前,而备份的数据库在后。 当时我提到说会单独...
分类:
数据库 时间:
2014-11-20 11:32:46
阅读次数:
264
湘潭项目使用Spring+CXF编写服务器端,JDBC操作全部由Spring完成,下面记录其中一个典型的实例。publicclassUserinfo_lvDaoImplimplementsUserinfo_lvDao{
//通过注解注入获得jdbcTemplate对象
@Autowired
privateJdbcTemplatejdbcTemplate;
/**
*根据name和password来查..
分类:
数据库 时间:
2014-11-20 10:26:55
阅读次数:
174
学习了下springjdbc,感觉挺实用的,相对来说springjdbc 扩展性相当好了
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;
import org.springframework.beans.fact...
分类:
数据库 时间:
2014-11-20 10:23:53
阅读次数:
290
mysql、sqlserver、oracle三种数据库维护索引、外键、字段语法总结,三者语法实现由些区别,供大家参考!...
分类:
数据库 时间:
2014-11-20 09:04:45
阅读次数:
148
原文地址--http://www.21shipin.com/html/97003.shtml今天同学向我提了一个问题,我觉得蛮有意思,现记录下来大家探讨下。问题是:在一个表里面,有一个允许为空的字段,空是可以重复的,但是不为空的值需要唯一。表结构如下面代码创建以下为引用的内容:CREATETABLE...
分类:
数据库 时间:
2014-11-20 09:01:55
阅读次数:
184
table a(id, type):id type----------------------------------1 1 2 1 3 2 table b(id, class):id class-------...
分类:
数据库 时间:
2014-11-20 06:46:57
阅读次数:
186
1基本使用1.打开数据库int sqlite3_open( const char *filename, // 数据库的文件路径 sqlite3 **ppDb // 数据库实例);2.执行任何SQL语句int sqlite3_exec( sqlite3*, ...
分类:
数据库 时间:
2014-11-20 06:46:10
阅读次数:
198
1、安装mysql:yuminstallmysql2、修改密码:mysqladminpassword1234563、远程登录权限:mysql-uroot-p后执行grantallprivilegeson*.*to‘root‘@‘%‘identifiedby‘123456‘;
分类:
数据库 时间:
2014-11-20 01:39:49
阅读次数:
203
mysql用户和权限管理作为一名mysql数据库管理员,有责任维护数据库系统上的数据的的完整性和安全性,使得只有被正确授权的用户才可以访问。这将涉及到数据库的外部安全性和内部安全星=性。所谓外部安全性:就是决定用户是否可以登入到mysql数据库系统上,这样可以有效的避免来..
分类:
数据库 时间:
2014-11-20 01:35:49
阅读次数:
334
MongoDB的安装有好多种安装方法,有普通青年的方式,也有2B青年的源码编译方式。我只想快速的装起来用一下,所以我选最简单的HomeBrew。请参考官方文档 : http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/更新Ho...
分类:
数据库 时间:
2014-11-20 01:28:46
阅读次数:
262
tar包解压mkdir -p $mongodb_dir/data/dbmkdr $mongodb_dir/logs新建配置文件#$mongodb_dir/mongod.cfg--dbpath=$mongodb_dir/data/db--logpath=$mongodb_dir/logs/mongod...
分类:
数据库 时间:
2014-11-20 01:25:53
阅读次数:
197
到处都使用超级用户sa显然是不安全的,因此有创建用户并让其只能访问某个数据库的必要。当然可以使用SQL Server自带的图形界面向导,但是太难用用了!有时候代码比较直接,比如这里:--使用已经创建好的数据库use mydbGO--创建登录用户和密码EXEC sp_addlogin N'mydb.....
分类:
数据库 时间:
2014-11-20 01:23:03
阅读次数:
232
DROP TABLE IF EXISTS `jd_admin`;CREATE TABLE `jd_admin` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(30) NOT NULL COMMENT '用户.....
分类:
数据库 时间:
2014-11-20 01:18:06
阅读次数:
307
public class BatchSearchUtil {
/**
* 注意:因为select的只有id,所以可用的也就只有id,其他字段如果想获取值,要在select后加字段名称,不然会报错
* @param lot
* @param li...
分类:
数据库 时间:
2014-11-20 00:10:56
阅读次数:
354