SQL Notes
SQL Notes
CLASS-XII
✔In order to access data within the MySQL database, all
SQL(structured Query Language)
Here, we can insert values without specifying column names provided the order of
values for columns should be same as in table.
Dropping a Table
• To drop a table in Database, following command
is
mysql> DROP Table <Table Name>;
For ex -
mysql>drop table <Student>
A message will come saying- “Query OK” now if you want to
see the structure of the table you cant see because it has
already been deleted.
Modification in Table structure
• To modifystructure of a table in
Database, following command is used-
mysql>ALTER TABLE <Table name> ADD/MODIFY(<Col>
<type(size)>, . . . .)
Viewing records
after deletion.
When both the tables have same field name, then to show a
field from particular table, use the following pattern to access a
field- <Table name>.<Field Name>
Ex- emp1.empcode
This is an example of Equi-
Join, in which columns are
compared for equality and it
is also an example of
Natural- Join, in which only
one of the identical columns