随笔分类 -  数据库编程

SQLSever,Oracle,PostgreSQL,MySQL,DB2,SQLite,MongoDB,HBase
摘要:https://www.codeproject.com/Articles/16179/The-Monty-Hall-Problem-C-Solution https://www.codeproject.com/Articles/30473/Monty-Hall-Paradox-Illustrated 阅读全文
posted @ 2017-06-19 09:45 ®Geovin Du Dream Park™ 阅读(455) 评论(0) 推荐(0)
摘要:https://www.microsoft.com/mspress/companion/0-7356-2313-9/ https://www.microsoftpressstore.com/store/inside-microsoft-sql-server-2008-t-sql-querying-9 阅读全文
posted @ 2017-06-16 17:01 ®Geovin Du Dream Park™ 阅读(559) 评论(0) 推荐(0)
摘要:https://ask.sqlservercentral.com/questions/16078/schema-and-role-permissions-for-all-users-in-a-dat.html 阅读全文
posted @ 2017-05-17 12:47 ®Geovin Du Dream Park™ 阅读(410) 评论(0) 推荐(0)
摘要:备注描述另种写法: 阅读全文
posted @ 2017-05-11 00:53 ®Geovin Du Dream Park™ 阅读(236) 评论(0) 推荐(0)
摘要:1.视图 a. CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY INVOKER VIEW `sakila`.`actor_info` AS SELECT `a`.`actor_id` AS `actor_id`, `a`.`firs... 阅读全文
posted @ 2016-10-11 17:26 ®Geovin Du Dream Park™ 阅读(405) 评论(0) 推荐(0)
摘要:select ProductGUID,ProductName,ProjectGUID from dbo.Product/*F637A079-E22B-4E50-87E9-000147B1B1F4产品5 4CB304EF-2135-43E7-90D6-B03B75CB491B C731BDB9-143... 阅读全文
posted @ 2015-12-07 15:36 ®Geovin Du Dream Park™ 阅读(421) 评论(0) 推荐(0)
摘要:--查看表生成脚本 sql server --- '\r'是回车,'\n'是换行 /t相当于键盘的Tab键 --- 操作系统的不同,换行符操也不同:/r Mac /n Unix/Linux /r/n WindowsUSE [master] --设定为系统用的,就是在各数据库中都可以调用... 阅读全文
posted @ 2015-09-22 11:20 ®Geovin Du Dream Park™ 阅读(800) 评论(0) 推荐(0)
摘要:-- Oracle 11 G --20160921 涂聚文再次修改 --Geovin Du --GetTables SELECT owner, object_name, created FROM all_objects WHERE (owner in ( select USERNAME from user_users )) AND object_type = 'TABLE' ORDER BY... 阅读全文
posted @ 2015-09-18 15:02 ®Geovin Du Dream Park™ 阅读(1087) 评论(0) 推荐(0)
摘要:#数据库MySQL 6.7use sakila;#查询表名show tables;#SELECT TABLE_NAME,TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='sakila';select column_name f... 阅读全文
posted @ 2015-09-18 12:34 ®Geovin Du Dream Park™ 阅读(414) 评论(0) 推荐(0)
摘要:安装配置:Install MongoDB on Windows(安装配置官方参考) http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/1.Run MongoDBC:\Program Files\MongoDB\Ser... 阅读全文
posted @ 2015-09-09 17:04 ®Geovin Du Dream Park™ 阅读(603) 评论(0) 推荐(0)
摘要:--Comparing data between two tables in SQL Server--Create two Tables--CREATE TABLE TableA(ID Int, ProuctName Varchar(256))GOCREATE TABLE TableB(ID Int... 阅读全文
posted @ 2015-08-24 10:45 ®Geovin Du Dream Park™ 阅读(477) 评论(0) 推荐(0)
摘要:create database bank;use bank;/* begin table creation */create table department (dept_id smallint unsigned not null auto_increment, name varchar(20) ... 阅读全文
posted @ 2015-07-16 17:27 ®Geovin Du Dream Park™ 阅读(286) 评论(0) 推荐(0)
摘要:--Oracle 9i 实例数据脚本地址:$oracle_home/rdbms/admin/utlsampl.sql CREATE TABLE DEPT (DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY, DNAME VARCHAR2(14) , LOC VARCHAR2(13) ) ; CREATE TABLE E... 阅读全文
posted @ 2015-05-28 21:21 ®Geovin Du Dream Park™ 阅读(556) 评论(0) 推荐(0)
摘要:csharp 调用: 阅读全文
posted @ 2015-05-26 22:22 ®Geovin Du Dream Park™ 阅读(313) 评论(0) 推荐(0)
摘要:Toad for Oracle 启动DBMS输出. Oracle SQL developer 和 SQL Plus 用Script启动:set serveroutput on size 5000; 见图: 阅读全文
posted @ 2015-05-22 09:35 ®Geovin Du Dream Park™ 阅读(350) 评论(0) 推荐(0)
摘要:http://www.mssqltips.com/sqlservertip/3449/making-sql-server-metadata-queries-easier-with-these-new-views http://www.sql-server-helper.com/functions/m 阅读全文
posted @ 2015-05-14 17:46 ®Geovin Du Dream Park™ 阅读(532) 评论(0) 推荐(0)
摘要:use geovindu;#函数DELIMITER $$drop function if exists f_GetDepartmentName $$CREATE function f_GetDepartmentName( did int) returns nvarchar(400) begind... 阅读全文
posted @ 2015-04-03 17:54 ®Geovin Du Dream Park™ 阅读(375) 评论(0) 推荐(0)
摘要:http://www.postgresonline.com/journal/archives/201-Using-RETURNS-TABLE-vs.-OUT-parameters.htmlhttp://www.postgresql.org/docs/9.4/interactive/index.htm... 阅读全文
posted @ 2015-04-03 10:24 ®Geovin Du Dream Park™ 阅读(972) 评论(0) 推荐(0)
摘要:SELECT * from pg_class c,pg_attribute a,pg_type t where c.relname='BookKindList' and a.attnum>0 and a.attrelid=c.oid and a.atttypid=t.oid SELECT a.att 阅读全文
posted @ 2015-04-02 12:14 ®Geovin Du Dream Park™ 阅读(637) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window... 阅读全文
posted @ 2015-03-31 12:57 ®Geovin Du Dream Park™ 阅读(273) 评论(0) 推荐(0)