|
|
 |
Re: FN-FORUM: MS SQL Help
date posted 4th May 2006 13:40
[EMAIL REMOVED] wrote:
>> SELECT ob.name, us.name as usename FROM dbo.sysobjects ob
>> inner join dbo.sysusers us on ob.uid=us.uid WHERE xtype = 'U'
>>
>
> Thanks Ben - that worked nicely.
>
>
>> That will get you the names of all the tables in the database.
>> You can then iterate through them and build the table creation
>> queries off the data that returns.
>>
>
> Is there a simple SQL Server equivalent to MySQL's "show create table x" or
> Oracle's "describe" commands? I tried a few things but got nowhere.
>
>
>
Not as far as I can recall, however sql server is replete with features
and I certainly don't know what all of them are so check Books Online
for details.
I just sorted the fields by table and then built the construction and
insert queries based on those.
Not hard, just a bit time consuming.
-ben
|
 |
|