New York Design & Development Forums

Go Back   New York Design & Development Forums > Employment > Job Offers
Connect with Facebook

Notices

Reply
 
LinkBack Thread Tools
Old 11-16-2011, 12:35 AM   #1 (permalink)
Junior Member
 
Join Date: Nov 2011
Posts: 2
Edwige is on a distinguished road
Default Mysql institutes for BE IT students Bangalore

AUTO INCREMENT a Field
For the auto increment of the values we can ue the auto increment option.
Syntax for MySQL
The following SQL statement defines the "P_Id" column to be an auto-increment primary key field in the "Persons" table:
CREATE TABLE Persons
(
P_Id int NOT NULL AUTO_INCREMENT,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
PRIMARY KEY (P_Id)
)
MySQL uses the AUTO_INCREMENT keyword to perform an auto-increment feature.
Example:
ALTER TABLE Persons AUTO_INCREMENT=100

Syntax for SQL Server
CREATE TABLE Persons
(
P_Id int PRIMARY KEY IDENTITY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)

Cegonsoft final year projects
__________________
Final Year Projects
Edwige is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Google Bookmark this Post!Blink this Post!
Reply With Quote
Old 12-07-2011, 11:18 PM   #2 (permalink)
Junior Member
 
Join Date: Dec 2011
Posts: 3
Freddy2 is on a distinguished road
Default Re: Mysql institutes for BE IT students Bangalore

Am New to this forum, and also in SQl... :)
__________________
Chicago health club
Freddy2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Google Bookmark this Post!Blink this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:09 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45