-
mssql 2k: how do i find a field in a database
looking for an sp or tsql that will allow me to locate a specific field name in a database, eg. table that field exists in.
-
use yourdatabasename
go
declare @columnnametosearch varchar(128)
--update the @columnnametosearch with your desired column
set @columnnametosearch='name'
select object_name(id) as Tablename,name as Columnname from syscolumns where name =@columnnametosearch
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|