perkiset

NBs helped me out a great deal today and got me going forward with a MSSQL task. Thanks man, very much.

Karma required I throw something back, so here is how to see all the tables in a database in MSSQL. I put it here because I had to google for it and better here than there. This is stoopid simple but nice to have:


mssql_connect('theserver', 'username', 'password');
mssql_select_db('thedb');
mssql_query("select name from sysobjects where type='u'");
while ($row = mssql_fetch_row())
print "{$row[0]} ";


Another interesting tidbit: when doing my first SELECT today, I got a permission denied on the table I was selecting from. Even though my default database was correct, I still had to mssql_select_db as shown above to get things to work pro

perl

 y.

vsloathe

Thanks Perk.

I think in oracle you query system.tab


SELECT * FROM system.tab


In case anyone ever needs to know how much I remember from college...


Perkiset's Place Home   Politics @ Perkiset's