Create Buses table 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 
Quiz for Exam -  Create Buses table

Code:

ddl1.sql

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)
);

Recommended:

Leave a Comment

Your email address will not be published. Required fields are marked *