faqts : Computers : Databases : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 6 people (67%) answered Yes
Recently 4 of 6 people (67%) answered Yes

Entry

Database: MySql: Command: Multiple: Execute: How to: How to run commands by copy/paste in MySql?

Jul 6th, 2008 13:23
Knud van Eeden, dman,


----------------------------------------------------------------------
--- Knud van Eeden --- 22 May 2005 - 01:59 am ------------------------

Database: MySql: Command: Multiple: Execute: How to: How to run 
commands by copy/paste in MySql?

---

Steps: Overview:

 1. -Start MySql monitor

      mysql.exe

 2. -This will open an MSDOS box

 3. -Copy your SQL query
      (advantage: you can see the SQL query text while they are 
executed)

e.g.

--- cut here: begin --------------------------------------------------

CREATE DATABASE databaseTest;

USE databaseTest;

CREATE TABLE
 tableCustomer
(
 columnId INT NOT NULL PRIMARY KEY,
 columnName VARCHAR( 50 )
)
;

INSERT INTO
 tableCustomer
(
 columnName
)
VALUES
(
 "Knud"
)
;

--- cut here: end ----------------------------------------------------

 4. -Paste this query text in this running MySql monitor
     MSDOS box

     1. -Click in the left top of the MSDOS box running MySql

     2. -Select from list 'Edit'

     3. -Paste the text

     4. -This query text will now be executed by the MySql.exe program

---
---

Internet: see also:

---

Database: MySql: Command: Multiple: Execute: How to execute multiple 
commands at once in MySql?
http://www.faqts.com/knowledge_base/view.phtml/aid/36416/fid/52

----------------------------------------------------------------------