
SQL
文章平均质量分 60
ghostmac
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SQL案例
数据升序,降序:select * from Person1where age >20 order by Number asc ,age asc; 数据分组(group by):select nickname,COUNT(*) from Person1 group by NickName; 取出分组中总数大于1的字段的数量:select age,count(*)转载 2011-06-13 13:49:00 · 678 阅读 · 0 评论 -
SQL 占位符
cmd.CommandText = "select * from LogIn where username = @username and password = @password";cmd.Parameters.Add(new SqlParameter("username", userName));cmd.Parameters.Add(new SqlParameter("password转载 2011-06-13 13:51:00 · 3875 阅读 · 0 评论 -
MySQL与分页
使用查询语句的时候,经常要返回前几条或者中间某几行数据,这个时候怎么办呢?不用担心,mysql已 经为我们提供了这样一个功能。SELECT* FROMtable LIMIT[offset,] rows| rows OFFSET offset转载 2011-08-08 12:10:53 · 397 阅读 · 0 评论 -
SQL语句在表中新增字段(列)
ALTER TABLE — 更改表属性语法ALTER TABLE table [ * ] ADD [ COLUMN ] column typeALTER TABLE table [ * ] ALTER [ COLUMN ] column转载 2011-09-27 11:05:55 · 11183 阅读 · 0 评论 -
ExecuteReader的用法
1、MSDN上说:Sends the CommandText to the Connection and builds a SqlDataReader. (这句话就不翻译了)2、实例片段: [C#]public void Crea转载 2011-10-18 12:58:45 · 18482 阅读 · 2 评论