March 11, 2008

Fundamental MySQL

Command
Explanation
CREATE databasenameCreates the database.
CREATE tablename (field1, field2,
field3, and so on PRIMARY KEY(field))
Creates a new table.
ALTER TABLE tablename WHERE conditionModifies a table in the database..
RENAME TABLE oldtablename TO newtablenameRenames a table in the database.
INSERT INTO tablename (field1,
field2, . . .) VALUES (“value1”,
“value2” . . .)
Inserts information into the table.
UPDATE tablename SET field1=value1, field2=value2 . . . WHERE conditionChanges information already stored in
the table.
DELETE FROM tablename WHERE conditionDeletes a record from the specified
table.
DROP tablenameDeletes the table.
DROP databaseDeletes the database.
LOAD DATA INFILE “filename” INTO
TABLE tablename
Loads a large quantity of data into database.
  

Share

0 comments:

Blogger template 'PlainFish' by Ourblogtemplates.com 2008