MYSQL Day1
MYSQL Day1
creating a database/schema
-----------------------------
2 ways
A. command line client
B. Workbench
use databasename;
use studentdb
3.create a table
-----------------
create table studentdetails(name varchar(100),rollno int);
show tables;
describe studentdetails;
constraints-->Not null
Unique
Primary key(unique+not null)
default
Practise query
--------------
adding same value twice for primary key column will give error
---------------------------------------------------------------
adding custid that is not present in parent table will give error
------------------------------------------------------------------