开发者

How to create the table using command in SQL Server 2005

开发者 https://www.devze.com 2023-03-23 21:48 出处:网络
I have installed SQL Server 2005. I am creating my table like this: open Microsoft SQL Server Management Studio

I have installed SQL Server 2005.

I am creating my table like this:

  • open Microsoft SQL Server Management Studio
  • create the database
  • then create the table (right click on Tables, create a new table) then it show the table UI.

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

For example using:

create table emp (emp_id varchar2(10)  NOT NULL,bas开发者_运维问答ic_salary varchar2(10) NOT NULL);

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


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消