- Database & DBMS
- Type of DB, SQL & non-sql / (RDBMS vs NRDBMS)
- SQL
- Tables, Columns(schema), Rows(individual data)
- MY First Query
SQL is not Case-Senstive
semi-colon important at every line-end
CREATE DATABASE college;
DROPE DATABASE college;
create table students(
// column_name datatype constraint
id int primary key,
name varchar(50),
age int not null,
);
Top comments (2)
I want to point out some errors:
DROPE DATABASE college;
should be DROP (probably a typo)An improvement I would make is
age int DEFAULT 0
. All languages are using more typing for variables, so it is better to return a default result that matches the type. Null is seen as a lazy solution nowadays.yeah learning sql can get kinda messy with all the weird details, tbh sometimes i still forget little syntax stuff - you ever catch yourself mixing up commands or does it all just click after some practice