Home  >  Article  >  Database  >  Firebird数据库的Select语句

Firebird数据库的Select语句

WBOY
WBOYOriginal
2016-06-07 14:59:281663browse

select first 10 skip 8 * from t_data //跳过前8行不要,取10行,即取第9行到18行共10行 select first 10 * from t_data //取前10行 select * from t_data rows 11 to 20 //取第11行到20行,共10行,行数从0开始 select * from t_data rows 11 //取前11行,

select first 10 skip 8 * from t_data   //跳过前8行不要,取10行,即取第9行到18行共10行

select  first 10 * from t_data    //取前10行
select  * from t_data rows 11 to 20  //取第11行到20行,共10行,行数从0开始

select  * from t_data rows 11  //取前11行,和First 11是一样


以上加order by 也表示是Order by 之后进行取行

 

查询当前时间:

select CURRENT_DATE + CURRENT_TIME   FROM RDB$DATABASE

 

默认监听端口:3050

 

修改用户密码:

"C:\Program Files\Firebird\Firebird_2_5\bin\gsec.exe" -user sysdba -password masterkey -modify sysdba -pw 123   //密码从默认修改为123

 

备份:

"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe" -b  db.fdb db.fbk -user sysdba -password masterkey         //完整备份

"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe" -b -m db.fdb db.fbk -user sysdba -password masterkey    //只备份结构,不备份数据,参数:-m

当前日期:%date:~0,4%%date:~5,2%%date:~8,2%

如果需备注文件加日期:"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe" -b  db.fdb db%date:~0,4%%date:~5,2%%date:~8,2%.fbk -user sysdba -password masterkey         //完整备份

 

恢复:

"C:\Program Files\Firebird\Firebird_2_5\bin\gbak.exe" -r  db.fbk  db.fdb -user sysdba -password masterkey   

 

以上可放在bat文件中,pause表示暂停

 

dotnet连接字符串:

//服务器模式

string cnstring = "server=127.0.0.1;database=xxx;user id=sysdba;password=masterkey";  

//嵌入式,不需输入密码,或随便输入什么密码都可

//数据库名可以用绝对路径,也可用相对路径如..\db\xx.fdb,也可在aliases.conf中指定具体位置

 string cnstring = "client library=fbembed.dll;user id=SYSDBA;database=xxx;server type=Embedded";
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn