Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS SQL - create Table query issue

Posted on 2013-06-16
1
Medium Priority
?
530 Views
Last Modified: 2013-06-16
Hi,

I wrote this query to create a table, but it is not working properly, here is the syntax I am using below:

CREATE TABLE Degrees

(DegreeID INT AUTO_INCREMENT,
DegreeName VARCHAR(100),
Description TEXT,
CONSTRAINT DegreeID_PK
PRIMARY KEY (DegreeID) );
0
Comment
Question by:Jack_son_
1 Comment
 
LVL 5

Accepted Solution

by:
DOSLover earned 2000 total points
ID: 39251345
What error are you getting? You can specify auto increment using identity:

CREATE TABLE Degrees
(DegreeID INT PRIMARY KEY IDENTITY,
DegreeName VARCHAR(100),
Description TEXT );

Open in new window

0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
This Micro Tutorial steps you through the configuration steps to configure your ESXi host Management Network settings and test the management network, ensure the host is recognized by the DNS Server, configure a new password, and the troubleshooting…

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question