Find column name in ms sql server database
Find column name in ms sql server database
Problem
Sometime, we need modification in any column of ms sql server database table. we are unaware where is that column. we dont what is name of the table, where column is exist.
Solution:
To find any column name you can use following ms sql server script.
select
s.[name] 'Schema',
t.[name] 'Table',
c.[name] 'Column',
d.[name] 'Data Type',
c.[max_length] 'Length',
d.[max_length] 'Max Length',
d.[precision] 'Precision',
c.[is_identity] 'Is Id',
c.[is_nullable] 'Is Nullable',
c.[is_computed] 'Is Computed',
d.[is_user_defined] 'Is UserDefined',
t.[modify_date] 'Date Modified',
t.[create_date] 'Date created'
from sys.schemas s
inner join sys.tables t
on s.schema_id = t.schema_id
inner join sys.columns c
on t.object_id = c.object_id
inner join sys.types d
on c.user_type_id = d.user_type_id
where c.name like '%Discount%'
Share This with your friend by choosing any social account
Comments
Your Comments
You may also read following recent articles
![]() |
7 Ways to Retain More of Every Book You Read!
04-Feb-2023 11 |
![]() |
Top 5 Most Tech Skills for 2023!
04-Feb-2023 10 |
![]() |
Rupee Drops to Historic Low After Comments From Dar, PM Shehbaz Cause Market to Panic!
03-Feb-2023 18 |
![]() |
What Is Technical SEO? Basics and 10 Best Practices!
03-Feb-2023 24 |
|
Top 10 Most Important IT Skills in 2023!
02-Feb-2023 36 |
![]() |
How To Create A Content Strategy Framework!
02-Feb-2023 18 |
![]() |
Can GPT-3 pay in the future?!
02-Feb-2023 7 |
![]() |
What is digital marketing? !
02-Feb-2023 46 |
|
Top Software Testing Trends in 2023!
01-Feb-2023 67 |
![]() |
How To Make Money on YouTube in 2023!
31-Jan-2023 36 |
![]() |
The 6 Best Entry-Level Sales Jobs To Start Your Career!
31-Jan-2023 23 |
![]() |
Affiliate Marketing Program for Beginners!
31-Jan-2023 5 |