A brief MySQL tutorial CSE 134A: Web Service conception and computer programing Fall 2001 9/28/2001 Creating and Deleting Databases 1) Creating a database mysql> hold database 134a; head OK, 1 row affected (0.00 sec) 2) Deleting a database mysql> DROP database 134a; interrogate OK, 0 rows affected (0.00 sec) Creating a tabular array 3) After we have created the database we engross the USE statement to falsify the current database; mysql> USE 134a; Database changed 4) Creating a table in the database is achieved with the hit table statement mysql> CREATE TABLE chairperson ( -> -> -> -> -> -> -> ); doubt OK, 0 rows affected (0.00 sec) last_name varchar(15) non trivial, first_name varchar(15) not null, state varchar(2) not null, urban center varchar(20) not null, origin realise not null default 0000-00-00, death date null Examining the Results 5) To see what tables are present in the database use the aim tables: mysql> SHOW tables; + ----------------+ | Tables_in_134a | +----------------+ | president | +----------------+ 1 row in decide (0.
00 sec) 6) The command bring out can be used to involve the structure of a table mysql> DESCRIBE president; +------------+-------------+------+-----+------------+-------+---------------------------------+ | Field | fictitious character | Null | Key | Default | Extra | Privileges | +------------+-------------+------+-----+------------+-------+---------------------------------+ | last_name | varchar(15) | | | | | | | | | | | | | | | | select,insert,update,references | | select,insert,update,refere nces | | select,insert,update,references | |! select,insert,update,references | | select,insert,update,references | | select,insert,update,references | | first_name | varchar(15) | | state | urban center | birth | death | char(2) | | varchar(20) | | date | date | | YES | 0000-00-00 | | NULL | +------------+-------------+------+-----+------------+-------+---------------------------------+ 6 rows in set (0.00 sec) Inserting / Retrieving Data into /...If you want to get a full essay, order it on our website: BestEssayCheap.com
If you want to get a full essay, visit our page: cheap essay
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.