Solved

MS SQL - create Table query issue

Posted on 2013-06-16
1
510 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 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When we have a dead host and we lose all connections to the ESXi, and we need to find a way to move all VMs from that dead ESXi host.
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now