|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
Hi
I am modelling a design in MySQL and MS SQL Server 2000 Personal Edition. I have never really used the MS offering and I just started looking/reading up about it and have the following question regarding data type equivalents. What is the MS SQL Equivalent of the following (from MySQL): ---- xxx INT NOT NULL AUTO_INCREMENT PRIMARY KEY, VARCHAR(200), LONGTEXT, ---- Thanks. Mak. |
|
#2
|
||||
|
||||
|
<< xxx INT NOT NULL AUTO_INCREMENT PRIMARY KEY, VARCHAR(200), LONGTEXT, >> i think you cannot have auto incement directly in the create statement. but you can have this: xxx INT NOT NULL PRIMARY KEY, you can use same varchar type in MSSQL: VARCHAR(200), You may use the "text" or "ntext" datatype in MSSQL instead of long text. TEXT, for auto increment number ,you need to create a "sequane" in sql and insert that while you issue sql statement.
__________________
SR - webshiju.com www.lizratechnologies.com "The fear of the LORD is the beginning of knowledge..." |
|
#3
|
|||
|
|||
|
Try this for creating an auto incrementing PK
INT NOT NULL IDENTITY PRIMARY KEY Optionaly you can chane the seep and increment thus: INT NOT NULL IDENTITY(seed, increment) PRIMARY KEY |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > MySQL - MS SQL Server data types? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|