随笔分类 -  数据库

摘要:摘自:iLinux0Feb 22 2006 4:26PMCONVERT(CHAR(19), CURRENT_TIMESTAMP, 0)102/22/06CONVERT(CHAR(8), CURRENT_TIMESTAMP, 1)206.02.22CONVERT(CHAR(8), CURRENT_TIMESTAMP, 2)322/02/06CONVERT(CHAR(8), CURRENT_TIMESTAMP, 3)422.02.06CONVERT(CHAR(8), CURRENT_TIMESTAMP, 4)522-02-06CONVERT(CHAR(8), CURRENT_TIMESTAMP, 阅读全文
posted @ 2012-12-12 18:44 维唯为为 阅读(608) 评论(0) 推荐(0)
摘要:安装配置1.从http://www.mongodb.org下载解压后,mongodb是一个独立的,不包含任何操作系统依赖,所以你可以在任何文件夹上运行mongodb,进到解压目录,运行:md data md data\db 来创建数据库文件夹,也可以手动指定数据库文件平,使用以下命令:C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data 如果路径包含空格,用双引号包起来C:\mongodb\bin\mongod.exe --dbpath "d:\test\mongo db data" 用户管理以admin登录,adm 阅读全文
posted @ 2012-09-06 19:47 维唯为为 阅读(502) 评论(0) 推荐(0)
摘要:MySQL的导入导出 导入sql脚本 方式一 mysql -u 用户名 -p 数据库名 < 存放位置 mysqljump -u root -p test < c:\a.sql方式二 1.在命令行输入以下命令 >mysql -u root -p123mysql>use test;mysql> source c:/test.sql用show tables;查看有哪些表 ... 阅读全文
posted @ 2012-09-03 19:42 维唯为为 阅读(345) 评论(0) 推荐(0)
摘要:mysql 脚本: sql脚本use information_schema; drop database if exists lampssell; create database lampssell; use lampssell; /********系统部分**********//*** 用户表 */drop table ... 阅读全文
posted @ 2012-07-16 22:06 维唯为为 阅读(137) 评论(0) 推荐(0)
摘要:杰普oracle笔记1(oracle配置、函数、查询、连接、建表、数据字典) 配置环境window 用户: 1.cmd 2.sqlplus system 3.password 4.create user briup identified by briup; 5.grant resource,connect to briup; 6.conn briup/briup; 7.show user; 8.alter session set nls_date_language=english; 9.执行脚本,导入数据表: @d:\summit2.sql 10.select * from tab; ---- 阅读全文
posted @ 2011-11-18 10:59 维唯为为 阅读(355) 评论(0) 推荐(0)
摘要:数据库原理数据库概念数据库(Database,简称DB)是长期储存在计算机内、有组织的、可共享的大量数据的集合。数据库系统的特点数据结构化数据的共享性高,冗余度低,易扩充数据独立性高数据由DBMS统一管理和控制两大类数据模型概念模型也称信息模型,它是按用户的观点来对数据和信息建模,用于数据库设计。 逻辑模型和物理模型,逻辑模型主要包括网状模型、层次模型、关系模型、面向对象模型等,按计算机系统的观点... 阅读全文
posted @ 2011-10-21 23:03 维唯为为 阅读(2200) 评论(0) 推荐(0)
摘要:--创建数据库create database LiangshanHeros2--drop database LiangshanHeros2use LiangshanHeros2 --使用这个数据库存--创建表create table hero(heroId int,--排名heroName varchar(50),--名字heroNickName varchar(50),--外号sex char(2), sal int ) --使用sqL语句来添加数据insert into hero values(1,'宋江','及时雨','男',20000) 阅读全文
posted @ 2011-08-14 19:54 维唯为为 阅读(440) 评论(0) 推荐(0)
摘要:一、JDBC连接各种数据库 1、Oracle8/8i/9i数据库(thin模式) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();Stringurl="jdbc:oracle:thin:@localhost:1521:orcl";//orcl为数据库的SIDStringuser="test";Stringpassword="test";Connectionconn=DriverManager.getConnection(url,user, 阅读全文
posted @ 2011-05-31 23:09 维唯为为 阅读(1308) 评论(0) 推荐(0)
摘要:#连接与断开服务器C:\DocumentsandSettings\Administrator>mysql-uroot-pEnterpassword:****mysql>quitBye#---------------------------mysql-uroot-pEnterpassword:****#----------------------------------------------#输入查询#mysql的版本号和当前日期SELECTVERSION(),CURRENT_DATE;#将mysql用作一个简单的计算器SELECTSIN(PI()/4),(4+1)*5;#一行上输 阅读全文
posted @ 2011-05-27 22:15 维唯为为 阅读(321) 评论(0) 推荐(0)
摘要:以root用户登录 Checking the following packages-----------------------------binutils-2.15.92.0.2-13.EL4compat-db-4.1.25-9compat-libstdc++-296-2.96-132.7.2control-center-2.8.0-12gcc-3.4.3-22.1.EL4gcc-c++-3.4.3-22.1.EL44glibc-2.3.4-2.9glibc-common-2.3.4-2.9gnome-libs-1.4.1.2.90-44.1libstdc++-3.4.3-22.1lib.. 阅读全文
posted @ 2011-04-27 17:18 维唯为为 阅读(629) 评论(0) 推荐(0)
摘要:打开cmd 运行SQLite,进入sqlitesqlite> .help.backup ?DB? FILE Backup DB (default "main") to FILE.bail ON|OFF Stop after hitting an error. Default OFF.databases List names and files of attached databases.dump ?TABLE? ... Dump the database in an SQL text format ... 阅读全文
posted @ 2011-04-27 16:48 维唯为为 阅读(287) 评论(0) 推荐(0)