Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft SQL Server, creating new table in server explorer

For a C# programming assignment I have to create a table in Microsoft SQL Server. I have Visual Studio 2013 and Microsoft SQL Server 2012 freshly installed. As I installed it I specified my user for admin access (this is on a laptop with only my user anyway). I can't seem to be able to fully follow my teacher's instructions for the assignment:

  1. Create a new WPF project called StudentDb
  2. Open Server Explorer ( View > Server Explorer )
  3. Right click on Data Connections > Create New SQL Server Database The Create New SQL Server Database window opens

  4. Select a Server name (default: .\SQLEXPRESS)

  5. Choose Windows Authentication
  6. Enter College as the new database name
  7. Click OK

  8. In Server Explorer you’ll find a new Database listed under Data Connections

  9. Expand the College Database (by clicking the triangle left of the College database)
  10. Right click Tables > Add New Table

On number 4, the only server that appeared was "MORTHOS" which is my computer name. (I am hoping that this is arbitrary). I was able to create a new DB named college. When I get to 6 I find that my progress grinds to a complete halt. I only have the options Refresh and properties and can't see where to add a new table as pictured here:

Tables right click

I know it has a valid connection, because it was able to successfully create the College database. I can even confirm that it has a good connection when I click "test":

enter image description here

Can someone please tell me what I am doing wrong?

EDIT: in SQL Server Management Studio I do see myself under the logins:

enter image description here

like image 505
Paul Nelson Baker Avatar asked Dec 08 '13 14:12

Paul Nelson Baker


People also ask

How do I create a table in SQL Server Object Explorer?

In SSMS, in Object Explorer, connect to the instance of Database Engine that contains the database to be modified. In Object Explorer, expand the Databases node and then expand the database that will contain the new table. In Object Explorer, right-click the Tables node of your database and then click New Table.

Where can I create a table in SQL Server?

To design a new table, open SSMS and connect to your sql server instance. In Object Explorer, expand the HR database or the database where you want to create a new table. Now, right-click on the Tables folder and select New Table , as shown below.

How do I use SQL Server Object Explorer?

As soon as you start SQL Server Management Studio (SSMS) the Object Explorer should open. If not then you can open it by one of the following ways: Pressing the shortcut key F8. From the menus select View > Object Explorer as shown below.


2 Answers

If you only see Refresh and Properties when you right click on Tables in Server Explorer, you probably need to install SQL Server Data Tools from http://msdn.microsoft.com/en-us/data/hh297027 .

like image 96
Samarth Agarwal Avatar answered Nov 15 '22 05:11

Samarth Agarwal


Use update after you create the table, don't use save

enter image description here

like image 30
Nathalie Avatar answered Nov 15 '22 06:11

Nathalie