0

I'm trying to use SQL Server Management Studio to edit database tables. But I can't seem to access the databases themselves through "Object explorer" (SQL Server Management Studio 2012 hangs).

How can I get the Design mode of a table without going through that?

Community
  • 1
  • 1
ispiro
  • 26,556
  • 38
  • 136
  • 291

2 Answers2

0

Use the command line:

For instance, if your username is bobby and your password is foo, use:

C:> sqlcmd -U bobby -P foo

Then select your database with use whatever_your_db_name_is # Note you do literally type use

then describe [table_name]

To list all tables: sp_help works and you can also use
select * from SYSOBJECTS where TYPE = 'U' order by NAME
which you can obviously change to meet your needs.

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
  • I tried that but got "sqlcmd: 'use ... ' Unexpected argument. (and by the way – it's a remote server I'm connecting to.) – ispiro Jun 13 '12 at 13:49
0

It looks it's not possible to open from TSQL any new tab in design mode for a table or view, the only way to do it is through the object explorer:

https://learn.microsoft.com/en-us/sql/ssms/visual-db-tools/open-the-query-and-view-designer-visual-database-tools

Sergio Prats
  • 1,043
  • 1
  • 14
  • 19