Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Faraz Ahmed Qureshi
Starting Member
3 Posts |
Posted - 2010-07-17 : 16:27:56
|
| Dear friends,Sure am new SQL as well as this forum. It's my first question. Using MS SQL Server 2008. Have created few databases with clicks. However, to create a Table via SQL sure wanna know the correct complete syntax of CREATE TABLE so as to make sure the new table should belong to a specific database for instance create a SP_TABLE (with SP_COL of VARCHAR) for SP_DB.Thanx in advance,Best Regards,Faraz Ahmed Qureshi |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Bea
Starting Member
7 Posts |
Posted - 2010-07-18 : 03:46:33
|
| Hello FarazHere is a simple example USE SP_DBCREATE TABLE SP_TABLE( SpIDint IDENTITY(1,1) PRIMARY KEY, SP_COL varchar(20),)Hope this helps Bea |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-07-19 : 06:58:47
|
quote: Originally posted by Bea Hello FarazHere is a simple example USE SP_DBCREATE TABLE SP_TABLE( SpIDint IDENTITY(1,1) PRIMARY KEY, SP_COL varchar(20),)Hope this helps Bea
The column SpIDint should have a datatypeMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|