79645
Using User-Defined Variables
You can employ MySQL user variables to remember results without having to storę them in temporary
variables in the Client. (See Section 9.4, “User-Defined Variables”.)
For example, to find the articles with the highest and lowest price you can do this:
mysql>SELECT @min_price : =MIN (price) , (?max_price : =MAX (price) FROM shop ;
mysql>SELECT * FROM shop WHERE price=@min_price OR price=@max_price;
----------+-
article | |
dealer |
.+--------
I price |
0003 I D 1 |
1 1.25 1 |
|
0004 | D I |
1 19.95 |
1 |
----------+- |
|
-+-------- |
Wyszukiwarka
Podobne podstrony:
Installing MySQL on Mac OS X Using Native Packages You can install MySQL on Mac OS X 10.3.x (“Panthesc0005 You can use phonetic/tonetic notation to transcribe intonation /di skjiptiv f9 netiks 8ViggliUsing SMF to manage your MySQL installation Once installed, you can start and stop your MySQL serverUsing MySQL Proxy There are a number of different ways to use MySQL Proxy. At the most basie level,Bndging By default, one bridge (brO) is defined and active. In this section you can define additionascreenshot 4 John Smith This is a description for the user. You can be bold and oblique but ituser photo Image Upload user photo or You can pastę external URLRunning Multiple MySQL Instances on Windows You can run multiple servers on Windows by starting themRunning MySQL in ANSI Modę You can tell mysąldto run in ANSI modę with the --ansi[428] startup optioTesting The MySQL Installation You can test whether the MySQL server is working by executing any ofCreating a Tablespace You can creatc additional tablcspaccs to storę user data, so that not all dataDeleting a Table If you no longcr nccd a table, then you can delete it using SQL Developer. When youDeleting an lndex If you no longcr nccd an index, thcn you can dclcte it using SQL Devcloper. In thiShutting Down and Starting Up Using SQL*Plus You can shut down and start thc Oracle instance using SShutting Down and Starting Up Using the Windows Services Program On Microsoft Windows, you can alsoUsing Data Recovery Advisor The recovery proccss bcgins when you cither suspect or discover a failurmemcached Deployment When using memcached you can use a number of different potential deployment strMySQL Proxy Command Options To start MySQL Proxy, you can run it directly from the command linę: shewięcej podobnych podstron