Select Statement of Firebird Database

Source: Internet
Author: User
Tags firebird database
Selectfirst10skip8 * fromt_data skip the first eight rows instead, take 10 rows, that is, take 9th rows to 18 rows total 10 rows selectfirst10 * fromt_data take the first 10 rows select * fromt_datarows11to20 take 11th to 20 rows, there are 10 rows in total. The number of rows starts from 0 and select * fromt_datarows11 takes the first 11 rows,

Select first 10 skip 8 * from t_data // skip the first eight rows. Do not, take 10 rows, select first 10 * from t_data // select * from t_data 11 to 20 from 10 rows to 18 rows, 10 rows in total, the number of rows starts from 0 select * from t_data rows 11 // obtain the first 11 rows,

Select first 10 skip 8 * from t_data // skip the first eight rows. Do not use 10 rows, that is, take 10 rows from 9th rows to 18 rows.

Select first 10 * from t_data // obtain the first 10 rows
Select * from t_data rows 11 to 20 // fetch 11th rows to 20 rows, 10 rows in total, the number of rows starts from 0

Select * from t_data rows 11 // obtain the First 11 rows, which is the same as the First 11 rows.


The preceding order by clause also indicates that the row is obtained after Order by clause.

Query the current time:

Select CURRENT_DATE + CURRENT_TIME from rdb $ DATABASE

Default port: 3050

Change User Password:

"C: \ Program Files \ Firebird \ Firebird_2_5 \ bin \ gsec.exe"-user sysdba-password masterkey-modify sysdba-pw 123 // The password is changed from 123 by default

Backup:

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

"C: \ Program Files \ Firebird \ Firebird_2_5 \ bin \ gbak.exe"-B-m db. fdb. fbk-user sysdba-password masterkey // only backup structure, no data, parameter:-m

Current date: % date :~ 0, 4% % date :~ 5, 2% % date :~ 8, 2%

If you need to add a date to the remarks file: "C: \ Program Files \ Firebird \ Firebird_2_5 \ bin \ gbak.exe"-B db. fdb db % date :~ 0, 4% % date :~ 5, 2% % date :~ . Fbk-user sysdba-password masterkey // full backup

Recovery:

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

The above can be placed in the bat file, and pause indicates the pause.

Dotnet connection string:

// Server mode

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

// Embedded, no password required, or any password required

// You can use an absolute path for the database name or a relative path such as .. \ db \ xx. fdb. You can also specify a specific location in aliases. conf.

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.