List:General Discussion« Previous MessageNext Message »
From:Hawk Date:February 6 2003 10:57pm
Subject:converting MS SQL to MySQL
View as plain text  

Hi,

I am new to SQL.  I am attempting to create a database that was created in 
MS SQL to MySQL.  The below SQL statements works with MS SQL.

I am executing the following:

CREATE TABLE 'Accounting'(
         'Username' VARCHAR(254) NULL,
         'CallerID' VARCHAR(128) NULL,
         'Addr' VARCHAR(128) NULL,
         'NAS' VARCHAR(128) NULL,
         'Port' VARCHAR(128) NULL,
         'Start' DATETIME NULL,
         'Stop' DATETIME NULL,
         'SessionTime' INTEGER DEFAULT 0,
         'ExtraTime' INTEGER DEFAULT 0,
         'TimeLeft' INTEGER DEFAULT 0,
         'KBytesIn' INTEGER DEFAULT 0,
         'KBytesOut' INTEGER DEFAULT 0,
         'SessionKB' INTEGER DEFAULT 0,
         'ExtraKB' INTEGER DEFAULT 0,
         'KBytesLeft' INTEGER DEFAULT 0,
         )
GO

CREATE INDEX IX_Username ON Accounting(Username)         <---- MySQL will 
not take this command
GO

CREATE TABLE 'ActiveUsers'(
         'UserID' VARCHAR(254) PRIMARY KEY,
         'NAS' VARCHAR(128) NULL,
         'Port' VARCHAR(128) NULL,
         'Username' VARCHAR(254) NULL,
         'CallerID' VARCHAR(128) NULL,
         'Address' VARCHAR(128) NULL,
         'LoginTime' DATETIME NULL,
         )
GO

CREATE TABLE 'TAC_GRP'(
         'TAC_ID' VARCHAR(254) NOT NULL,
         'TAC_Attr' VARCHAR(64) NOT NULL,
         'TAC_Val' TEXT NULL
         )
GO

CREATE UNIQUE INDEX IX_TAC_ID ON TAC_GRP(TAC_ID, TAC_Attr)  <---- MySQL 
will not take this command
GO

CREATE TABLE 'TAC_USR'(
         'TAC_ID' VARCHAR(254) NOT NULL,
         'TAC_Attr' VARCHAR(64) NOT NULL,
         'TAC_Val' TEXT NULL
         )
GO

CREATE UNIQUE INDEX IX_TAC_ID ON TAC_USR(TAC_ID, TAC_Attr) <---- MySQL will 
not take this command
GO


Thanks in advance. 

---
[This E-mail scanned for viruses by Friend.ly.net.]

Thread
converting MS SQL to MySQLHawk6 Feb
  • Re: converting MS SQL to MySQLVeysel Harun Sahin8 Feb
  • Re: converting MS SQL to MySQLBarry C . Hawkins8 Feb
Re: converting MS SQL to MySQLmysql-list7 Feb
Re: converting MS SQL to MySQLBarry C. Hawkins10 Feb