Alex (SirShurf) Frenkel's Blog

A web log of a PHP professional

Get Microsoft Sql table list form PHP

leave a comment »

One of the things I lost time today was how to get the list of table from Ms SQL server from PHP on Unix (Ubuntu).

I will write another post how to connect to it later, but currently what I have found is that MsSQL does not have “SHOW TABLES” command like MySQL do.

In order to get the list of table we need to send:
select name from sysobjects where xtype = ‘U’

This way we would get all of the user tables in our database.


Written by Alex (Shurf) Frenkel

May 12, 2010 at 2:20 pm

Posted in Uncategorized

Tagged with , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: