user783160
user783160

Reputation: 175

How to create the table using command in SQL Server 2005

I have installed SQL Server 2005.

I am creating my table like this:

Can I create the table using command in SQL Server 2005 ?

For example using:

create table emp (emp_id varchar2(10)  NOT NULL,basic_salary varchar2(10) NOT NULL);

please help where I use this command to create the table.

Upvotes: 2

Views: 8623

Answers (1)

marc_s
marc_s

Reputation: 755531

Yes of course you can do this!

In SQL Server Management Studio, select (or create) the database for your table, then:

  1. select New Query (either from the toolbar, or from File > New > New Query using current connection)

  2. type in (or copy&paste in) your T-SQL statement

  3. run that statement (menu: Query > Execute or equivalent keyboard shortcut)

and you're done!

Upvotes: 3

Related Questions