Simple MySQL commands
MySQL is a
database system used by many sites in order to maintain a functional database
for web use. The system is easy to install and further used by doing simple
configuration to the system. Below are
some of the simple commands to be used in MySQL that further provides easy
functioning in the system.
The commands
used on MySQL helps in the direct interaction with the database on the server.
Such commands are most of the time useful in sudden requirements of the
application in order to create a database or the tables related to it. By
loading the sql script one is ready to create the given requirements. For
accessing any command line one has to execute the command by entering the
password.
Some simple commands in MySQL
·
For
creating the users of the table simple commands are useful.
·
In
case of user nickname are required only with their concerned favorite number,
some easy to use commands can do the desired task.
·
For
the nicknames availed if provided with pair of socks that are less than 10 and
if the favorite number specified is more than 100 then the command will specify
the detail in it.
·
For
inserting the row of data into the system table, an easy to use command of
MySQL will provide the best solution.
·
For
if the row of the data has the password missing the command is somewhat same as
the one recommended for creating the password for the user table.
Common statements to be used:
For more
complex type of commands there are different statements and clauses are used
that helps in generating the commands. Some of the mostly used statements and
clauses are
ALTER DATABASE
ALTER VIEW
ANALYZE TABLE
CACHE INDEX
CHECK TABLE
COMMIT
CREATE INDEX
CREATE DATABASE
CREATE VIEW
DELETE
DROP DATABASE
DROP INDEX
DROP USER
EXPLAIN
GRANT
INSERT
KILL
LOAD DATA INFILE
LOCK TABLES
RENAME TABLES
RESET MASTER
RESTORE TABLE
SET PASWORD
SHOW COLUMNS
SHOW CREATE TABLE
An example of complete MySQL command:
Apart from
these famous statements there is still much to learn regarding the string
functions of the system as well as functional aspect of date and time. To
explain more about some simple commands let us take an example of a complete
set of command performing the desired function.
·
Replacing
the statements
The action
of replacing the item is performed in a row. The action of replacement is more
dependent on the id as in order to REPLACE effectively one has to add the
column of PRIMARY. Once the primary column has been set as id the system will
be familiar as to which row the necessary action has to be performed. Consequently if the id is not specified
system will have no information of which row one has intended to bring changes.
In the
statements where id is not specified to the system it will act more like an
INSERT action. In simple words if the primary row is specified the changes will
be made only in concerned row.
0 comments:
Post a Comment