易截截图软件、单文件、免安装、纯绿色、仅160KB

SQLITE 下面的语句该怎么写

在 SQL SERVER 中的语句 是:
  SELECT
    (ROW_NUMBER() OVER (ORDER BY Name) - 1) / 4 + 1 AS TitleRow,
    (ROW_NUMBER() OVER (ORDER BY Name) - 1) % 4 + 1 AS TitleColumn,
    Name,
    Color,
    ThumbNailPhoto
from Production.MailLabel

在SQLITE 中该怎么写 ? 谢谢大侠

SQL code:
select
((select count(*) from MailLabel where Name<=a.Name)-1)/4+1 as TitleRow,
((select count(*) from MailLabel where Name<=a.Name)-1)%4+1 as TitleColumn,
Name,
Color,
ThumbNailPhoto
from MailLabel a



SQL code:
sqlite> select * from MailLabel;
name|color|ThumbNailPhoto
1|1|1
2|2|2
3|3|3
4|4|4
5|5|5
6|6|6
7|7|7
sqlite> select
...> ((select count(*) from MailLabel where Name<=a.Name)-1)/4+1 as TitleRow,
...> ((select count(*) from MailLabel where Name<=a.Name)-1)%4+1 as TitleColumn,
...> Name,
...> Color,
...> ThumbNailPhoto
...> from MailLabel a;
TitleRow|TitleColumn|name|color|ThumbNailPhoto
1 | 1 | 1 | 1 | 1
1 | 2 | 2 | 2 | 2


相关问答:

SQLite执行SQL出现IO异常

Mobile6  SQLite版本1.0.65,数据连接没问题.可以执行查询操作.但是更新或修改时就会抛出Some kind of disk I/O error occurred
disk I/O error异常,请知道这个问题的高手解读下.不胜感激.


sql= ......

Sqlite返回多结果集问题

Sqlite返回多个查询结果集的时候,有什么办法能移动到下一个结果集上去
比如
有语句
select * from sqlite_master where type='table';select * from sqlite_master where type='index'; ......

如何在sqlite中删除前N条记录

没有主键,我只要删除前N条记录。n数值大概在千万级别的。
用set rowcount n

引用
用set rowcount n


支持

SELECT IDD=IDENTITY(INT,1,1),* INTO #T from TB

DELETE #T WHERE IDD NOT I ......

Sqlite无法更新

C# code:
public static bool UpdateFriendUrl(int id, string cnName, string jpName, string logoUrl, string site, int order)
{
string sql = "update FriendUrl set SiteNameCN=@SiteNameC ......

help!SQLite中操作blob类型的字段的问题

这是我查到的资料
http://www.cppprog.com/2009/0108/43.html 已经存进图片了,现在做到这一步了,
“这时数据库当中已经有了一条包含BLOB字段的数据。接下来我们要读取这条数据:  1.  //选取该条 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号