Solved

MS SQL - create Table query issue

Posted on 2013-06-16
1
523 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
DOSLover earned 500 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

636 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