Write a query to create a table with the following structure table product field data type P name whatcha description watches price decimal
Answers
The SQL Query is
Create table Product ( PID CHAR (4), Pname VARCHAR (20), Description VARCHAR (40), Price DECIMAL);
Given data:
Table name: Product
Fields: PID, Pname, Description, Price
Datatypes: Char (4), Varchar (20), Varchar (40), Decimal
To write:
A query to create a table structure using given data.
Explanation:
To create a table structure in MySQL, you need to follow the syntax given below.
CREATE TABLE TABLE_NAME ( COLUMN1 DATATYPE(SIZE) [CONSTRAINTS], COLUMN2 DATATYPE(SIZE) [CONSTRAINTS], ...);
Constraints are optional here. Keywords in MySQL are case-insensitive.
The difference between CHAR and VARCHAR is, The CHAR data type is a fixed-length character type (0,255) while, VARCHAR isn't.
Learn more:
1. What are the maximum and the minimum number of rows returned by the R1 right outer join R2?
brainly.in/question/21195376
2. Write SQL commands for (a) to (e) on the basis of FAMILY relation given below:
https://brainly.in/question/15115256