随笔分类 -  SQL server数据库

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SqlClient; namespace Demp13 { class Program { st... 阅读全文
posted @ 2018-12-05 23:07 九之者 阅读(2090) 评论(0) 推荐(0)
摘要:SQL Server数据库————连接查询和分组查询 分组查询 select 列from <表名> where …… group by 列 注意:跟order by一样group by 后面可以写多个列 写多个列则按照多列分组 having:对分组之后的结果进行筛选 !!!注意:having必须写在 阅读全文
posted @ 2018-12-03 18:23 九之者 阅读(2656) 评论(0) 推荐(0)
摘要:***********模糊查询*********/ 关键字: like (!!!!字符串类型) in (,,) 匹配()内的某个具体值(括号里可以写多个值) between... and.. 在某两个值的区间范围中(前后都包括,小的写前面,大的写后面) **********通配符********/ 阅读全文
posted @ 2018-12-03 18:20 九之者 阅读(979) 评论(0) 推荐(0)
摘要:--增删改查--增 insert into 表名(列名) value(值列表) --删 delect from 表名 where 条件 --改 update 表名 set 列名=值1,列名2=值2 where 条件 --查 select 列名1,列名2,...from 表名 where 条件 group by 列名 having 集合函数条件 order by 列名 阅读全文
posted @ 2018-12-03 13:47 九之者 阅读(1098) 评论(0) 推荐(1)
摘要:第九章——数据查询基础 ********查询******** select 列名1,列名2....from 表名 where 条件 ********别名******** 1)别名 = 列名 2)列名 as 别名 3)列名 别名 ********常量列***** 列名 = 值 *********排序* 阅读全文
posted @ 2018-11-21 18:12 九之者 阅读(175) 评论(0) 推荐(0)
摘要:第三章————用SQL语句操作数据 *********************新增**************************** 1. insert into 表名(列名1,列名2...) values(列1的值,列2的值...) !!!注意: 1)字符串类型,日期类型加单引号 插入bit 阅读全文
posted @ 2018-11-21 18:10 九之者 阅读(191) 评论(0) 推荐(0)
摘要:第二章————用表组织数据 **********数据类型********* 数字: Int 长度默认为4,不可改变长度 real >double decimal(numeric) >decimal(一共多少位,小数点后面多少位) !!注意:小数点后面超出,四舍五入;整数部分超出,报错 例:numer 阅读全文
posted @ 2018-11-19 19:37 九之者 阅读(267) 评论(0) 推荐(0)
摘要:*****************************数据库的必要性******************************** 数据库可以高效的且条理分明的存储数据,更加迅速和方便的处理数据。 *****************************数据库的基本概念*********** 阅读全文
posted @ 2018-11-16 17:08 九之者 阅读(326) 评论(0) 推荐(0)