Write an SQL query to create a table with the following structure.
Field Type
Emp_no char(4)
Name varchar(25)
Salary Float
Department varchar(15)
Answers
Hi
This is very simple...
CREATE TABLE Employee (
Emp_no char(4),
Name varchar(25),
Salary Float,
Department varchar(15)
)
All you have to do is execute above line is SQL box.. that's it.
Answer:
let table name= table_name
query..
create table table_name ( emp_no char( 4 ), name varchar( 25 ), salary float(10), department.field varchar ( 15 ) );
Explanation:
The first column is called emp_ no which is created as a char datatype ( 4 maximum characters in length) and can not contain null values.
The second column is called name which is a char datatype (25 maximum characters in length) and also can not contain null values.
The third column is called salary which is a float datatype and The third column is called department which is a char datatype (25 maximum characters in length) and also can not contain null values.