数据库
文章平均质量分 82
刘晓飞
CSDN 乐知学院.Net专业
展开
-
10-21登陆 注册 (SqlHelp)
**************************************登陆 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.原创 2012-10-21 10:35:21 · 740 阅读 · 0 评论 -
用带有输出参数的存储过程进行新闻的搜索
存储过程 CREATE PROC Proc_GetNewsByTitleANDContent @newskey VARCHAR(64), @count INT out AS SELECT NewsTitle,SUBSTRING(NewsContent,1,20)+'....' AS NewsContent,CreateTime From T_News WHERE NewsTitle原创 2013-03-12 17:23:45 · 606 阅读 · 0 评论 -
实现新闻信息的修改和添加功能
*****************************************WebForm1.aspx前台 新闻标题 添加 *******************************************************WebForm1.aspx后台 pr原创 2013-03-11 20:01:41 · 2536 阅读 · 0 评论 -
动态生成表格
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; using System.Data.SqlClien原创 2013-03-05 16:33:56 · 594 阅读 · 0 评论 -
增改查
学生编号: 学生姓名: 班级编号: 班主任姓名: 联系电话: 家庭住址: Text="添加信息" /> style="height: 21px" Text="查询信息" />原创 2013-03-04 20:13:15 · 449 阅读 · 0 评论 -
11-13asp中实现存储过程的增删改查!
注册: protected void btnlogin_Click(object sender, EventArgs e) { string username = txtusername.Text.Trim(); string password = txtpassword.Text.Trim();原创 2012-11-13 20:50:26 · 614 阅读 · 0 评论 -
11-8(今天老师上课讲的)
--1声明变量 @age和@name declare @age int declare @name varchar(50), --2赋值 ----(1)方法1 set @age=18 set @name ='lxf' ----(2)方法2 select @age =18 select @name ='lxg' --3分别使用set和select 为行号变量@rcount赋值原创 2012-11-08 22:37:00 · 683 阅读 · 0 评论 -
11-6数据库加强(子查询(独立子查询,相关子查询),分页显示,开窗函数 over(),join )
--子查询:就是把一个查询结果作为另一个查询的数据源 SELECT * FROM MyStudents ----(1) 独立子查询 SELECT * FROM (select FName,FAge,FGender from MyStudents where FAge=18) as Tbl1 where FGender='女' and FName LIKE '张%' -- sele原创 2012-11-07 15:20:20 · 1361 阅读 · 0 评论 -
11-5 数据库加强(dateadd,datediff,datepart case()函数)整理了上课的笔记和老师留的作业
-1计算100天后病毒发作的日期。 print convert(varchar(50),dateadd(day,100,getdate()),111) --2凡是入职一年以上的员工,工资增加500¥ select *from Employee update Employee set EmpSalary=EmpSalary+1000 where DATEADD(year,1,Em原创 2012-11-07 15:14:10 · 709 阅读 · 0 评论 -
说说今天的收获吧
--1计算100天后病毒发作的日期。 print convert(varchar(50),dateadd(day,100,getdate()),111) --2凡是入职一年以上的员工,工资增加500¥ select *from Employee update Employee set EmpSalary=EmpSalary+1000 where DATEADD(year,1,E原创 2012-11-05 19:24:08 · 499 阅读 · 0 评论 -
10--26sql 看看肯定是有用的
--类型转换 1 把日期转换成 月日年 的字符串的格式输出 select convert (varchar(50),getdate()) 2 查询出每个销售员的销售总金额,以及总的销售金额(底 部汇总) select 销售员, 销售金额=SUM (销售数量*销售价格) from MyOrders group by 销售员 union all select '总的销售原创 2012-10-26 20:49:08 · 599 阅读 · 0 评论 -
10-25带条件查询
1. -- 查询 MyStudents 数学成绩没有及格的学生 select FId as 学号,FMath as 数学成绩 from MyStudents where FMath 2. -- 查询年龄大于 20 的男学生 select * from MyStudents where FGender='男' and FAge>20 3. -- 查询年龄大于 27and 小于 33原创 2012-10-25 16:46:15 · 901 阅读 · 0 评论 -
10-22数据库 复习
今天老师复习的数据库的内容、我觉得吧、这块不难,之前学过嘛听起来很轻松、老师上课讲的就是创建数据库、创建表、还有简单的sql语句、主要的目的就是让我们掌握好基础的一些东西、把原来学过的东西捡回来! 这是今天下午亲手敲过的代码、也是老师上课讲的例题 --创建数据库TestSchool create database TestSchool on primary ( name='Tes原创 2012-10-22 19:50:00 · 649 阅读 · 0 评论 -
加查询功能的分页显示(包括当前的页码数和总共的页码数,和直接跳到第几页)
int pagesize = 3; string str = ConfigurationManager.ConnectionStrings["constr"].ConnectionString; protected void Page_Load(object sender, EventArgs e) { if(!IsP原创 2013-03-13 21:10:28 · 4676 阅读 · 0 评论