I am trying to run a MYSQL script that starts as such:
GO
/****** Object:  Table [dbo].[tblStadiumType]    Script Date: 06/24/2010 10:09开发者_开发知识库:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblStadiumType](
    [stadiumtype_id] [int] IDENTITY(1,1) NOT NULL,
    [stadiumtype] [nvarchar](50) NULL,
 CONSTRAINT [aaaaatblStadiumType_PK] PRIMARY KEY NONCLUSTERED 
(
I run it in bash using:
mysql db_name < script.sql -p
However, upon running, I get this error:
' at line 1
And that's it! I am thoroughly confused, and SQL scripting isn't my strong point, and I'm trying to evaluate a script to understand it to implement it into a PHP script. (The SQL script was sent to me by another developer). Any help would be appreciated.
Mysql doesn't have 'GO'. Instead it uses the ';' deleter.
SET ANSI_NULLS ON;
SET QUOTED_IDENTIFIER ON;
etc etc....
Your final parenthesis seems to be the wrong way... See if this makes it any better:
GO
/****** Object:  Table [dbo].[tblStadiumType]    Script Date: 06/24/2010 10:09:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tblStadiumType](
    [stadiumtype_id] [int] IDENTITY(1,1) NOT NULL,
    [stadiumtype] [nvarchar](50) NULL,
 CONSTRAINT [aaaaatblStadiumType_PK] PRIMARY KEY NONCLUSTERED 
)
                                        
                                        
                                        
                                        
                                        
                                        
                                        
                                        
 加载中,请稍侯......
      
精彩评论