2009/07/29

Firebird的Show Tables?那是MySQL的指令啦!

出處:FAQ for Firebird Users Migrating From MySQL

原文如下:

How to list all tables in a database?

In MySQL, you can do SHOW TABLES. You can use the same in Firebird's isql command-line tool, but nowhere else. However, this can be done by querying Firebird's system tables:

SELECT RDB$RELATION_NAME FROM RDB$RELATIONS;

This query will show you both system and user tables. To select user tables only, use this:

SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$SYSTEM_FLAG = 0;

Note for advanced users:
The above query will select both user tables and views. To select tables only use this:

SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$SYSTEM_FLAG = 0 AND RDB$VIEW_BLR IS NULL;

有看不懂的…再寫個意見給我吧。

沒有留言:

張貼留言

How to use URLEncode in Delphi

URL編碼,也稱【百分號編碼(Percent-encoding)】 由於 URL 不能直接接受 UTF8 文字,所以要先轉成百分號編碼後,如此網址才能順利送給 HTTP Server 從 Indy 加入 Delphi 後,就可以用 IdURI.TIdURI 單元進行編碼 ...