List:General Discussion« Previous MessageNext Message »
From:Roger Davis Date:May 8 2003 2:39am
Subject:RE: making a mysql script
View as plain text  
Example "Notepad" File...

CREATE DATABASE /*!32312 IF NOT EXISTS*/ test;

USE test;

--
-- Table structure for table 'AAA'
--

CREATE TABLE AAA (
  ID int(11) NOT NULL auto_increment,
  Name char(30) default NULL,
  LastName char(30) default NULL,
  address char(30) default NULL,
  PRIMARY KEY  (ID)
) TYPE=MyISAM;

--
-- Dumping data for table 'AAA'
--

INSERT INTO user VALUES ('root','Davis','MyAddress');


Command to execute it...

mysql -u myuserwithcreateaccess <  nameofmyfile.txt

Roger

> -----Original Message-----
> From: Kurt [mailto:k.killen@stripped]
> Sent: Wednesday, May 07, 2003 1:51 PM
> To: mysql@stripped
> Subject: making a mysql script
> 
> 
> Shoot me now. In Oracle you can write an SQL procedure, in notepad for 
> example, to create a table. You can then save this file in case you need 
> to recreate the table later. The problem I am having is the naming of 
> the file format and what command to use to run the file from the MySQL 
> command prompt.
> 
> In Oracle you type
> 
> SQL> @filename.sql
> 
> What do I name the file?
> How to I run the file?
> 
> Thanks
> 
> Kurt
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?unsub=1
> 
Thread
making a mysql scriptKurt8 May
  • RE: making a mysql scriptBruce Douglas8 May
  • RE: making a mysql scriptRoger Davis8 May
  • Re: making a mysql scriptSam A. Funk11 May
    • manipulating myqsl database from javascript function....Bruce Douglas12 May
      • Re: manipulating myqsl database from javascript function....Greg Donald12 May
        • Re: manipulating myqsl database from javascript function....Rene van de Weerd14 May
      • Re: manipulating myqsl database from javascript function....colbey12 May
        • RE: manipulating myqsl database from javascript function....Daevid Vincent14 May
RE: making a mysql scriptDave Christensen9 May