Sp_tablesXML
- Last UpdatedNov 02, 2023
- 1 minute read
The sp_tablesXML stored procedure lists all the tables within a database or all databases. You can use the Microsoft SQL wildcard character "%" as a database name to specify all databases.
Syntax
sp_tablesXML (‘<dbname>’)
Example
call sp_tablesXML (‘%’);
Output
The output will be a list of all the tables in all the databases.
Example
call sp_tablesXML (‘RTDB’)
Output
The output will list all the tables in the RealTime database (RTDB) database.
<?xml version="1.0" standalone="no" ?>
<OASyS DNASQLEngineSchema>
<database name="RTDB">
<table name="message" description="Message text and color" allowUpdate="yes" allowSelect="yes" allowDelete="yes" allowInsert="yes" />
<table name="webxosdisplay" description="Table of WEB clients currently connected" allowUpdate="yes" allowSelect="yes" allowDelete="yes" allowInsert="yes" />
<table name="almdisturbance" description="Alarm Disturbance" allowUpdate="yes" allowSelect="yes" allowDelete="yes" allowInsert="yes" />
</database>
</OASyS DNASQLEngineSchema>