kurt...
if i understand your issue/question....
----------------------------------------------------------------------------
---------
#
# Usage:
# Make sure the dbid database exists or create it by
# d:\mysql -u "user" -p "passwd" -e "create database dbname"
# user ==> the username for the mysql database
# passwd ==> the passwd for the mysql database
# dbname ==> the name you give your database
#
# to create the tables. From a prompt, type
# c:\mysql -u -p < dbid.sql
#
#
#
# Test database
#
use dbid;
#
# AuctionTbl
#
# Table is used to store information on the auctions that occur
# on the site. This includes new/current/old auctions. The table
# contains the following information:
#
# auctionname varchar(25) NOT NULL default ''
# status int(5) NOT NULL, //status of the auction
# auctionid int(11) NOT NULL
# auctiondescr varchar(25) NOT NULL default ''
# auctionlocation varchar(25) NOT NULL default ''
# auctiontime timestamp
# auctiontype varchar(25) NOT NULL default '' (webcast/on-location/etc..)
# auction_length varchar(20) NOT NULL default '',
# spotlight int(1) NULL, //defines which items in col #1
# spotlight_data text NULL, //defines the spotlight data
# span varchar(50) NULL, //defines the span section (rarely used)
# id int(11) NOT NULL
#
CREATE TABLE AuctionTbl (
compname varchar(50) NOT NULL default '',
status int(5) NOT NULL,
dbid_id int(11) NOT NULL,
descr text NOT NULL,
location varchar(25) NOT NULL default '',
_time datetime NOT NULL default '0000-00-00 00:00',
type varchar(25) NOT NULL default '',
auction_length varchar(20) NOT NULL default '',
spotlight int(1) NULL,
spotlight_data text NULL,
span varchar(50) NULL,
id int(10) NOT NULL auto_increment,
PRIMARY KEY (id)
) TYPE=MyISAM;
---------------------------------------------------------------------------
Everything between the ------------ lines is representative of what could go
in a mysql script file. Simply name the script whatever you
want.."foo.sql"..etc... Lines beginning with # are of course comments...
Hope this helps..
Bruce
-----Original Message-----
From: Kurt [mailto:k.killen@stripped]
Sent: Wednesday, May 07, 2003 10:51 AM
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