浏览模式: 标准 | 列表
Tag:sql

SQL Server中删除重复数据的几个方法

Jump to comments » 310 views

数据库的使用过程中由于程序方面的问题有时候会碰到重复数据,重复数据导致了数据库部分设置不能正确设置……

方法一

declare @max integer,@id integer
declare cur_rows cursor local for select 主字段,count(*) from 表名 group by 主字段 having count(*) > 1
open cur_rows
fetch cur_rows into @id,@max
while @@fetch_status=0
begin
select @max = @max -1
set rowcount @max
delete from 表名 where 主字段 = @id
fetch cur_rows into @id,@max
end
close cur_rows
set rowcount 0

修改遗失了的mysql的root密码

Jump to comments » 2712 views

遗失了mysql的root密码怎么办?看这篇文章就对了~

简单学习理解掌握SQL注入技术

Jump to comments » 3136 views

一篇讲述SQL注入的扫盲文章

MySQL中最常用的几个命令

Jump to comments » 3066 views

在MySQL里面,如果你只是想新建一个User、一个Database。那么知道下面这几个命令就足够了:

登录MySQL: mysql -u root -p

添加数据库: create database xxxxx

添加并授权用户: grant all privileges on xxxxx.* to 'newuser'@'localhost' identified by "password"

 

MySQL中修改密码及访问限制设置详解 [收藏]

Jump to comments » 3265 views
 

两台SQL Server数据同步解决方案 [收藏]

1 Comments » 3830 views
 

导入导出大量数据程序实现方法

Jump to comments » 3290 views
大家一定使用过 phpmyadmin 里面的数据库导入,导出功能,非常方便。但是在实际应用中,我发现如下几个问题:

巧在MySQL中直接储存图片

Jump to comments » 3131 views
如果你想把二进制的数据,比如说图片文件和HTML文件,直接保存在你的MySQL数据库,那么这篇文章就是为你而写的!我将告诉你怎样通过HTML表单来储存这些文件,怎样访问和使用这些文件。
Records:1112