Create Buses table program in SQL

 


Question:

Create Buses table

Refer the below schema and create the buses table.

Column NameDatatypeSizeConstraintConstraint name
Bus_noNumber11Primary keyPK_BUSES
Bus_nameVarchar220  
TypeVarchar220  
Total_seatsNumber11  
Avail_seatsNumber11


Code:
create table buses(
Bus_no number(11),
  Bus_name varchar2(20),
  Type varchar2(20),
  Total_seats number(11),
  Avail_seats number(30),
  constraint PK_BUSES primary key(Bus_no)
);
Previous
Next Post »