sql常用语句
use myoa
select * from
delete from department where departmentid=1
insert Department(DepartmentId,DepartmentName) values(1,'技术部')
update Department set departmentname='信息技术部' where departmentid=1
--删除表
drop table department
--删除数据库
drop database bai
--统计数据库表中记录
select count(*) as 数据库记录 from Department
相关文档:
using (con)
{
con.Open();
String sqltext = "select * from emp where empno=@empno";
......
SQL 注入攻击原理及防护
在确认可以注入的情况下,使用下面的语句:
HTTP://www.163.com/news.asp?id=xx ;and (select count(*) from sysobjects)>0
HTTP://www.163.com/news.asp?id=xx ;and (select count(*) from msysobjects)>0
如果数据库是SQLServer,那么第一个网址的页面与原页面HTTP://www.163.com/news.asp? ......
1) 统计各个系的学生信息
select count(Sname) 总人数,Sdept from Student group by Sdept
2) 查询信管系学生的最大年龄和最小年龄
select MAX(Sage) 最大年龄,MIN(Sage) 最小年龄 from Student where
Sdept='信管系'
3) 查询信管系最大年龄和最小年龄的学生的姓名
select Sname from St ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BuildQuery
{
/// <summary>
/// 使用提供的数据建立一个SQL查询
/// </summary>
public class BuildQuery
{
#region 类的变量
int numFieldsCount, ......
1.sql存储过程概述
2.SQL存储过程创建
3.sql存储过程及应用
4.各种存储过程使用指南
5.ASP中存储过程调用的两种方式及比较
6.SQL存储过程在.NET数据库中的应用
7.使用SQL存储过程要特别注意的问题
1.sql存储过程概述
在大型数据库系统中,存储过程和触发器具有很重要的作用。无论是存储过程还是触发器,都是SQL 语 ......