Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2007, 03:20 PM
Registered User
 
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL 2005 learning

Hi,

   I have installed Visual studio 2005. Along with it, SQL server 2005 also got installed. I wanted to learn SQL 2005, but do not how to start. For example, how to create tables etc. ( I know MS-Access)

   Any help ?

   Thanks.

 
Old September 20th, 2007, 03:35 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Oh wow, that is a pretty large question and entire books have been wrote on it. The following explination is from Beginning SQL Server 2005 Programming by Robert Vieira - Chapter 5

(You will place this code in a query window)

The first part of creating a table is pretty much the same as creating any object — remember that line I showed you? Well, here it is again:

CREATE <object type> <object name>
Since a table is what we want, we can be more specific:

CREATE TABLE Customers

With CREATE DATABASE, we could have stopped with just these first three keywords, and it would have built the database based on the guidelines established in the model database. With tables however, there is no model, so we need to provide some more specifics in the form of columns, datatypes, and special operators.

Let's look at more extended syntax:

CREATE TABLE [database_name.[owner].]table_name (<column name> <data type>
[[DEFAULT <constant expression>]
   |[IDENTITY [(seed, increment) [NOT FOR REPLICATION]]]] [ROWGUIDCOL]
   [COLLATE <collation name>]
   [NULL|NOT NULL]
   [<column constraints>]
   |[column_name AS computed_column_expression]
   |[<table_constraint>]
   [,...n]

)

[ON {<filegroup>|DEFAULT}]

[TEXTIMAGE_ON {<filegroup>|DEFAULT}]
Now that's a handful — and it still has sections taken out of it for simplicity's sake! As usual, let's look at the parts, starting with the second line (we've already seen the top line).


Alternatively you can use the Management Studio and right click on the 'Tables' folder underneath your database and select 'New Table'

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========
 
Old September 22nd, 2007, 08:21 AM
Registered User
 
Join Date: Aug 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

   Thanks for reply.

   It was very helpful. However, I could not find 'Management Studio' . In start menu, it shows - SQL 2005 server => Configuration.



 
Old September 22nd, 2007, 09:21 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The management studio (for the express edition of SQL2K5) can be downloaded from here:

https://www.microsoft.com/downloads/...displaylang=en

If you are using a full blown SQL Server 2005 install, the management studio should be on the install disc.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on learning Visual C++/C# 2005 J150 Visual C++ 2005 8 July 11th, 2008 02:19 AM
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
Upgrade 2000 DBs to 2005 or install SQL 2000/2005 cJeffreywang SQL Server ASP 0 February 13th, 2008 10:44 PM
Learning ActiveX controls in VC++ 2005 kuznickic Visual C++ 2005 0 September 14th, 2007 06:21 AM
Converting from MS SQL 2005 to Sql Epress edition saif44 SQL Language 0 February 16th, 2007 04:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.