1

I have a table in my database in SQL server 2014 with a lot of columns, and when I want to find a column for modify properties, it is difficult to find that column, how can I find that column (ex: column name = "Birthdate"), has SSMS have any tools (such as find tool) for finding that column.

1

If you start by looking at the table definition in the Object Explorer and expand the columns properties, you can simply type the first letter of the column you are looking for. If you keep hitting the same letter, SSMS will cycle through all the columns that start with that letter...

if you then right click the column and and choose modify, it will open the designer at the right column...

(using ssms 17.9.1 - but worth a try)

enter image description here

0

This will let you search all columns in the database you're in and show you the table any matches belong to:

select 
    o.name as ParentTable
    ,ac.name as ColumnName
    ,ac.column_id as ColumnID
    from sys.all_columns ac
        left join sys.objects o
        on ac.object_id = o.object_id
    where o.type = 'u'
        and ac.name like '%File%'

If you would like to see more information about the column take a look at the other columns in sys.columns.

  • may be my question not clear, with your query i find considered column and show in result pan, now how i can modify my column properties such as datatype. – Masoud Sadeghi Aug 6 '19 at 8:25
  • @MasoudSadeghi You can make some changes through SSMS but you should take a look at the how to use the ALTER COLUMN command . How you modify the table might depend on what data is already there and what you want to change. If you could add that information to your question you should get some better answers :) – KevH Aug 6 '19 at 8:34
  • I want finding and apply changes in the table design view. – Masoud Sadeghi Aug 6 '19 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.