如何将PostgreSQL表保存为HTML?
答案 0 :(得分:10)
我会假装你的意思。在psql中:
dbname=# \H dbname=# \d tablename
答案 1 :(得分:2)
以下是XML“forest”的示例:
SELECT xmlforest (
"FirstName" as "FName", "LastName" as "LName",
’string’ as "str", "Title", "Region" )
FROM "Demo"."demo"."Employees";
对于employees表中的一些数据,可能会导致:
<FName>Nancy</FName>
<LName>Davolio</LName>
<str>string</str>
<Title>Sales Representative</Title>
<Region>WA</Region>
...
<FName>Anne</FName>
<LName>Dodsworth</LName>
<str>string</str>
<Title>Sales Representative</Title>