Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    India
    Posts
    523

    Question Unanswered: create table problem

    hi,
    I have a script through which I want to create a few tables.
    when I try to create the tables individually it works fine but if I try to create the same tables in one script it gives me an error .please help.
    CREATE TABLE a (
    cardid int NOT NULL ,
    cardtype varchar (50) NOT NULL ,
    supported tinyint NOT NULL
    )

    CREATE TABLE b (
    prodid int NULL ,
    name varchar (200) NULL ,
    description text NULL
    )

    regards,
    Harshal.

  2. #2
    Join Date
    Sep 2002
    Location
    Kyiv, Ukraine
    Posts
    77
    Code:
    CREATE TABLE a (
    cardid int NOT NULL ,
    cardtype varchar (50) NOT NULL ,
    supported tinyint NOT NULL 
    );
    
    CREATE TABLE b (
    prodid int NULL ,
    name varchar (200) NULL ,
    description text NULL 
    )
    You forgot to put semicolon(;) between two queries.

    Also I've came up to another question. I've noticed some time ago that when executing PHP script with mysql_query($string) you can't put as a parameter 'two-queries' string there and instead should use two separate mysql_query() functions ... Why is that, anyone knows?
    Yours faithfully,
    Yaroslav Zaremba

  3. #3
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    thanks for the reply actually I have worked in ms sql and am new to mysql and we have GO between two statements thanks for the reply
    regards,
    Harshal.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •