I keep forgetting –
I am selecting into an output file with terminal MySQL sever operations – I need to create a delimiter between SELECT sets. How can I insert a “—“?
SELECT "---";
Doesn’t work obviously.
Also is there a way to format output from MySQL commands?
Mine looks like a mess:
track_id track_title track_num album genre artist length track_rating
1 Siberia 1 1 1 1 00:04:29 5
2 Where the Fence is Low 2 1 1 1 00:03:24 5
3 Toes 3 1 1 1 00:03:19 5
4 Banner 4 1 1 1 00:03:37 5
5 Everybody Breaks a Glass 5 1 1 1 00:03:55 5
6 Heavy Rope 6 1 1 1 00:03:59 5
7 Timing Is Everything 7 1 1 1 00:03:16 5
8 Peace Sign 8 1 1 1 00:03:20 5
9 Flux and Flow 9 1 1 1 00:03:17 5
10 Fourth Dimension 10 1 1 1 00:03:27 5
11 Hollywood 1 2 3 3 00:04:13 5
12 In This Moment 2 2 3 3 00:04:31 5
13 Some Kind of Wonderful 3 2 3 3 00:03:04 5
14 End of May 4 2 3 3 00:03:53 5
15 Me and Mrs. Jones 5 2 3 3 00:03:43 5
16 Have not met you yet 6 2 3 3 00:05:20 5
17 Heartache Tonight 7 2 3 3 00:03:47 5
18 Best of Me 8 2 3 3 00:04:33 5
19 Swimming in Miami 1 4 1 4 00:04:56 5
20 Captains and Cruise Ships 2 4 1 4 00:03:29 5
The command you state “doesn’t work, obviously” should work fine in MySQL.
If you feel the need to have a FROM clause in the SQL statement, the docs state that you can use
FROM DUALas “dummy” table.