Documente Academic
Documente Profesional
Documente Cultură
SQL / MYSQL /
ORACLE
www.myassignmenthelp.net
www.assignmenthelp.net
SQL Database
SQL (Structured Query Language) is a database computer language designed for managing
data in relational database management systems (RDBMS).
MYSQL Database
MySQL is a relational database management system (RDBMS) that runs as a server providing
multi-user access to a number of databases.
ORACLE Database
Oracle is the name of the database management system that comes from Oracle Corporation.
PRIMARY KEY
A Primary Key is a column or combination of columns whose values uniquely identify a
row or record in the table.
Examples for specifying a Primary Key,
Primary
Key
Specifying
a primary
key by
Altering a
table
DROP
TABLE
SQL
MYSQL
ORACLE
www.assignmenthelp.net
Sample Output
www.assignmenthelp.net
FOREIGN KEY
A FOREIGN KEY in one table points to a PRIMARY KEY in another table.
Examples for specifying a Foreign key when creating a table (using CREATE TABLE)
or by changing the existing table structure (using ALTER TABLE).
Table1: Student
Column Name
Datatype
characteristic
Sid
integer
Primary Key
LastName
varchar
FirstName
varchar
Table2: Book
Column Name
Datatype
characteristic
BookId
integer
Primary Key
BookName
varchar
Student_Sid
integer
Amount
integer
Foreign Key
Foreign Key
SQL
MYSQL
ORACLE
Specifying a
Foreign Key
by Altering a
table
DROP Table
DropTABLE Book;
Foreign Key
Sample Output
CREATE TABLE
SQL
MYSQL
ORACLE
Creates an index on a
table. Duplicate values are
allowed.
DROP TABLE
SQL
MYSQL
ORACLE
It is used to delete a
Table.
It is used to delete a
database.
DROP DATABASE
database_name
DROP DATABASE
database_name
TRUNCATE TABLE
table_name
DROP INDEX
table_name.index_name
ALTER TABLE
SQL
MYSQL
ORACLE
Add a column in a
table
Delete a column in a
table
References
http://en.wikipedia.org/wiki/Sql
http://en.wikipedia.org/wiki/Mysql
http://www.w3schools.com/sql/default.asp
Thank
You
www.myassignmenthelp.net