Knowee
Questions
Features
Study Tools

Create following table using SQL statements.Client tableField name      Data type                AttributesClientno            char(6)                    Primary keyName                 Varchar(20)         Not NullCity                      Varchar(50)          Not NullPin NumberMobile                   Char(10)

Question

Create following table using SQL statements.Client tableField name      Data type                AttributesClientno            char(6)                    Primary keyName                 Varchar(20)         Not NullCity                      Varchar(50)          Not NullPin NumberMobile                   Char(10)

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is the SQL statement to create the table as per your requirements:

CREATE TABLE Client (
    Clientno CHAR(6) PRIMARY KEY,
    Name VARCHAR(20) NOT NULL,
    City VARCHAR(50) NOT NULL,
    Pin_Number INT,
    Mobile CHAR(10)
);

This statement will create a table named 'Client' with the fields 'Clientno', 'Name', 'City', 'Pin_Number', and 'Mobile'. The 'Clientno' field is the primary key, and the 'Name' and 'City' fields cannot be null.

This problem has been solved

Similar Questions

Table below shows the structure of a table named Car. Use it to answer the questions that follow:FieldData TypeCarIDIntegerModelVarChar(20)YearofManufactureDateStatusInteger      Write an SQL statement that would perform each of the following:                    i.            Create the table Car with the relevant fields;                                           (3 Marks)                  ii.            Make CarID the primary Key;                                                                  (2 Marks)                iii.            Add fields name Make and Price that store 30 characters and numbers respectively.                                                                                                                      (3 Marks

When you create a table in a database, you need to identify a suitable name. In this case, you can call it "customers". 2. Based on 'CM Mobiles' requirements the customers table will have three columns: ● username ● full name ● email address3. The customer username contains alphanumeric values such as: Custom001, Custom002, and Custom003. Notice here that the username is always nine characters in length, so choose the CHAR datatype as it allows for a fixed length of characters. In this case, choose 9 characters, no more or less. Therefore you can declare the username in the SQL statement using the following SQL syntax:

Create Table Employee with attributes firstName,LastName,SSN,Address,Salary,Birthday,Sex,SupervisorSSN,DepartmentNo

Question 8In the following student table, which attribute could be used as a primary key?Student first nameStudent last nameMobile numberCarl Merlo07445532123MarkNero074565323271 pointStudent last nameMobile numberStudent first name

Consider the following table:Product TableColumn NameDataTypeConstraintprod_nameVarchar2(20) prod_idNumber(10)PK Customer TableColumn NameDataTypeConstraintcust_last_nameVarchar2(20) cust_idNumber(10)PKcust_cityVarchar2(20)  Sales TableColumn NameDataTypeConstraintprod_idNumber(10)FKcust_idNumber(10)FKquantity_soldNumber(10,2)  Generate a report that gives details of the customer's last name, name of the product and the quantity sold for all customers in 'Tokyo'.Which two queries give the required result? (Choose two.)Select one or more:a.SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM products p JOIN sales sON(p.prod_id=s.prod_id)JOIN customers cON(s.cust_id=c.cust_id)WHERE c.cust_city='Tokyo';b.SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM products p JOIN sales s JOIN customers cON(p.prod_id=s.prod_id)ON(s.cust_id=c.cust_id)WHERE c.cust_city='Tokyo';c.SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM sales s JOIN products pUSING (prod_id)JOIN customers cUSING (cust_id)WHERE c.cust_city='Tokyo';d.SELECT c.cust_last_name,p.prod_name,s.quantity_soldFROM products p JOIN sales sUSING (prod_id)ON(p.prod_id=s.prod_id)JOIN customers cUSING(cust_id)WHERE c.cust_city='Tokyo';

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.