Sqlite int转换为十六进制
sqllite里面有什么方法把int转换为十六进制存储的呢?
例如,strftime('%s', 'now') 得到1263777947,当前的秒数,我想存储为它的十六进制表示"4B53B89B"
谢谢..
其实我是想strftime('%s', 'now')差生的秒数和randomblob产生一个随机数组合作为ID,用十六进制来保存是为了节省空间,作为ID字段默认值,自动产生,如果用程序再处理有点不太好弄了.
虽然可以通过查询来实现这种转换但效率会比较差,并且移植性不好。
谢谢大家了..
相关问答:
我用sqliteadmin建了一个数据库test.sdb,可是怎么也打不开提示如下错误:File opened that is not a database file
file is encrypted or is not a database。
我的连接字符串如下楼上的可不可以帮我看看
S ......
如下语句 :
select TimeSpan from T_Table where onlineDate = '2009-12-2'
数据库里面有符合条件的值但是查不出来
如果改成如下:
select TimeSpan from T_Table where onlineDate = '200 ......
程序代码如下:
sqlTime = "select SUM(onlineTimeSpan) from T_OnlineTimeSum where ipAddress = :a AND onlineDate BETWEEN :b AND :c";
  ......
string ConStr="data source=C:\ceshi.db;verson=3;password=123456";
SQLiteConnection MyConnection = new SQLiteConnection(ConStr);
try
{ ......
SqlServer中这样统计:
select name from sysobjects where xtype='U'
要知道总数的话就简单了:
select count(*) from sysobjects where xtype='U'
Oracle中这样查询:
Sele ......