DataBase
文章平均质量分 56
angelof7
这个作者很懒,什么都没留下…
展开
-
通过powerdesign查看mysql数据库
1、选择数据库菜单2、配置odbc3、新加一个odbc驱动配置4、设置连接参数ok确定后如下图:原创 2013-09-24 15:28:05 · 663 阅读 · 0 评论 -
[LeetCode] Consecutive Numbers - SQL
Write a SQL query to find all numbers that appear at least three times consecutively.+----+-----+| Id | Num |+----+-----+| 1 | 1 || 2 | 1 || 3 | 1 || 4 | 2 || 5 | 1 || 6 | 2原创 2015-03-10 20:38:50 · 1197 阅读 · 0 评论 -
[LeetCode] Rank Scores - SQL
Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking number should be the next consecutive integer value.原创 2015-03-10 21:18:19 · 935 阅读 · 0 评论 -
Ubuntu下彻底解决mysql中文乱码
Mysql5.5默认的是客户端和服务器都用了latin1,所以会乱码#vim /etc/mysql/my.cnf原创 2014-04-22 19:41:05 · 675 阅读 · 0 评论 -
创建索引
什么是索引拿汉语字典的目录页(索引)打比方:正如汉语字典中的汉字按页存放一样,SQL Server中的数据记录也是按页存放的,每页容量一般为4K 。为了加快查找的速度,汉语字(词)典一般都有按拼音、笔画、偏旁部首等排序的目录(索引),我们可以选择按拼音或笔画查找方式,快速查找到需要的字(词)。同理,SQL Server允许用户在表中创建索引,指定按某列预先排序,从而大大提高查询速度。•转载 2013-12-27 12:46:47 · 506 阅读 · 0 评论 -
10 Common Mistakes Java Developers Make when Writing SQL
Java developers mix object-oriented thinking with imperative thinking, depending on their levels of:Skill (anyone can code imperatively)Dogma (some use the “Pattern-Pattern”, i.e. the pattern转载 2013-11-11 16:22:22 · 519 阅读 · 0 评论 -
SQLServer_Oracle_DB2数据库SQL语句比较
1.1.1 取前n条记录 SQL Server: Select top n * from xtable Oracle: Select * from xtable where rownum DB2: Select * from xtable fetch first n row原创 2013-10-18 20:42:13 · 742 阅读 · 0 评论 -
经典SQL语句大全
一、基础1、说明:创建数据库CREATE DATABASE database-name 2、说明:删除数据库drop database dbname3、说明:备份sql server--- 创建 备份数据的 deviceUSE masterEXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNw原创 2013-10-18 18:36:13 · 680 阅读 · 0 评论 -
SQL查询语句大全集锦
SQL查询语句大全集锦一、 简单查询 简单的Transact-SQL查询只包括选择列表、FROM子句和WHERE子句。它们分别说明所查询列、查询的表或视图、以及搜索条件等。例如,下面的语句查询testtable表中姓名为“张三”的nickname字段和email字段。代码:SELECT `nickname`,`email`FROM `testtable`WHERE `name`转载 2013-10-18 18:30:01 · 1038 阅读 · 0 评论 -
[LeetCode] Department Highest & Top 3 Salary - SQL
The Employee table holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.+----+-------+--------+--------------+| Id | Name | Salary | Department原创 2015-03-10 21:56:35 · 757 阅读 · 0 评论