select子查询作为一列
摘要:select nsrmc, (select jg.swjgmc from dim.dim_dm_gy_swjg JG where jg.swjg_dm= xx.zgswskfj_dm) 主管税务所 from dj_nsrxx xx 提前写,省得在后面再写where =号,更简洁 高效 等价于 sel
阅读全文
SQLite没有IF函数, 可以用Case When代替
摘要:例如 if(activity_type="start", -1*timestamp, timestamp) CASE when activity_type="start" then -1*timestamp when activity_type="end" then timestamp end
阅读全文
SQLite两个时间日期相差天数julianday的计算(26)
摘要:selECT julianday( datetime('2015-01-05 00:00:00') )- julianday( strftime('%Y-%m-%d %H:%M:%S',recordDate ) ) from weather julianday()函数精确到秒,所以要 添加Time小
阅读全文
1581.进店却未进行过交易的顾客
摘要:https://leetcode.cn/problems/customer-who-visited-but-did-not-make-any-transactions/?envType=study-plan-v2&envId=sql-free-50 表:Visits + + + | Column N
阅读全文
FireDAC对SQLite正则表达式的支持
摘要:FireDac SQLite默认是不支持正则,但可以写函数实现TFDSQLiteFunction用来实现自定义函数 记得uses System.RegularExpressions;FDSQLiteFunction1.DriverLink := FDPhysSQLiteDriverLink1;FDS
阅读全文
SQLite系统表sqlite_master和SQLITE_SEQUENCE
摘要:每一个 SQLite 数据库都有一个对应的 SQLITE_MASTER 表, 它定义了数据库的模式。 SQLITE_MASTER表是只读的。不能对它使用 UPDATE、INSERT 或 DELETE。 它会被 CREATETABLE、CREATE INDEX、DROP TABLE 和 DROP IN
阅读全文
(sqlite)database table is locked
摘要:https://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_SQLite_database_(FireDAC) LockingMode Sets the database connection locking-mode. The va
阅读全文
sqlite3 从CSV文件导入数据
摘要:链接:https://pan.baidu.com/s/1kPBm2CD1gA67dBVOm46tDg提取码:w4pw 0]Sqlite3.exe下载,https://www.sqlite.org/download.html 1]数据库有要有空表ddd结构, 2]CSV文件 要是UTF-8编码,否则,
阅读全文
Delphi10.3开发的SQLite3的图形操作小软件
摘要:通过网盘分享的文件:connectnion学习V44.rar链接: https://pan.baidu.com/s/1CneGD_fqTXsfPXhG-7PydA 提取码: a57v listbox2.Items.Add(FDMetaInfoQuery1.FieldByName('COLUMN_NA
阅读全文
如何用DBGrid1一直显示数据库里的数据,并设置好 显示 列宽
摘要:procedure TMainForm.UniFormCreate(Sender: TObject); begin FDConnection1.Connected:=true; FDQuery_user.Active:=true; FDQuery_user.SQL.Text:= 'select id
阅读全文
FDMetaInfoQuery1查询表结构详细信息
摘要:官方说明 https://docwiki.embarcadero.com/RADStudio/Sydney/en/Querying_Metadata_(FireDAC) https://docwiki.embarcadero.com/RADStudio/Sydney/en/Working_with_
阅读全文
FireDAC为SQLite添加自定义函数FDSQLiteFunction1(21)
摘要:https://www.cnblogs.com/yjhb/p/11804239.html 我的测试代码下载: 链接:https://pan.baidu.com/s/1q7Fis_LYdV9vSyXOiCSNqA 提取码:htvx procedure TForm3.FDSQLiteFunction1C
阅读全文
FireDAC中官方SQL语句增insert,查Select,删delete,改update语句写法
摘要:procedure TfrmGettingStarted.btnInsertClick(Sender: TObject); const strInsert = 'insert into Categories(CategoryName, Description, Picture) values(:N,
阅读全文
Delphi10.3主从表步骤(18)
摘要:链接:https://pan.baidu.com/s/15gJJrljsYniqe6f0jwxpBQ 提取码:1sdn 主从表SQLite纯代码实现 链接:https://pan.baidu.com/s/1_7BFzTMq1p8a_HXZ6sQD0g 提取码:2xvb 1.基本设置 2.在FDQue
阅读全文
sqlite不支持 select into_create table A as select * from B(17)
摘要:sqlite不支持 select into_create table A as select * from B(17)
阅读全文
Sqlite3双竖线||字符串拼接(16)
摘要:select '12345'||'asdfads'
阅读全文
Sqlite3之inStr字符串函数(15)
摘要:https://www.sjkjc.com/sqlite-ref/string-functions/
阅读全文
Sqlite3之左子串,右子串,中间串subStr函数(14)
摘要:右子串 subStr('一二三四五',-4) select subStr('一二三四五',-4) 左子串 substr('一二三四五',1,3) 中串,比如取出 三四 select subStr('一二三四五',3,2)
阅读全文
Sqlite3之case分支语句_数据透视表(13)
摘要:https://blog.csdn.net/weixin_45488228/article/details/104480537 SELECT case when abitmap=0 then '零' when abitmap=1 then '壹' else '贰' end as bitmap fro
阅读全文