Question
SQL Question 2
Using your table from question 1:
Create a minimum of 4 INSERTS.
On one of your INSERTs, do not specify all of your columns. In other words, if you have 5 columns in your table, only mention 4 or less columns in one of your INSERTs.
Be sure to write a comment above the INSERT with less columns and explain what is missing in a full English sentence.
You should write a simple SELECT after your INSERTs to see the new data.

Question 1) (1 mark) Create your own table with a minimum of 3 columns. You must use at least 3 different kinds of data types
0 0
Add a comment Improve this question Transcribed image text
Answer #1

First i will give the complete code :

drop table TableOfStudent;
create table TableOfStudent(idOfStudent integer, nameOfStudent varchar(20), gender char(1), CONSTRAINT std_id PRIMARY KEY (idOfStudent));
insert into TableOfStudent(idOfStudent, nameOfStudent, gender) values(100, "Vyshu",'M');
insert into TableOfStudent(idOfStudent, nameOfStudent, gender) values(200, "Puthus",'M');
insert into TableOfStudent(idOfStudent, nameOfStudent, gender) values(300, "Jesee",'F');
--The next insert query contains only 2 parameters . the colum named gender is missing in this insert query
--For that specify the column names only for the first two columns
insert into TableOfStudent(idOfStudent, nameOfStudent) values(400, "Hasu");

select * from TableOfStudent;


Explenation :

Q1) As in the question, I had created a table named "TableOfStudent" with 3 columns, Also the orimary key was given as out-of line constriant

Q2). It is ok to insert the data as below, if all the coumns values are present in the insert statement

insert into TableOfStudent values(300, "Jesee",'F');
Add a comment
Know the answer?
Add Answer to:
SQL Question 2 Using your table from question 1: Create a minimum of 4 INSERTS. On...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • this is sql developer question I just need the format of how to answer question! Create...

    this is sql developer question I just need the format of how to answer question! Create sequences (2) that can be used to number the member ID and group ID values starting with 3 (since you already have 1 and 2). Write an INSERT statement that adds another row to the Groups table, make up a group name. Use the NEXTVAL pseudo column to get the value for the next group ID from the sequence that you created in #5....

  • - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed ...

    - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed park. You must design additional parts of the database and create the following SQL Script. Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates to the following tables Employee table (project 1) Job table (project 1) ProjectMain table (Project 2) ActivityMain table (Project 2) . . For each one of the table above, you...

  • Write code for mySQL 1) create a new one database ; to create your table 2)...

    Write code for mySQL 1) create a new one database ; to create your table 2) Every table should have a primary key 3) Table relationship has to be based on foreign key and shown within your physical table 4) Insert 5 data records in every table 9) Create a database view that return result set of all record and all columns within all 6 table

  • 2. Write a script that implements the following design: In the Downloads table, the user_id and...

    2. Write a script that implements the following design: In the Downloads table, the user_id and product_id columns are the foreign keys. Create these tables in the ex schema. Create the sequences for the user_id, download_id, and product_id columns. Include a PL/SQL script to drop the table or sequence if it already exists. Include any indexes that you think are necessary. 3. Write a script that adds rows to the database that you created in exercise 2. Add two rows...

  • Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates...

    Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates to the following tables: • Employee table (project 1) create table Employee ( empNumber char(8) not null, firstName varchar(25) null, lastName varchar(25) null, ssn char(9) null, address varchar(50) null, state char(2) null, zip char(5) null, jobCode char(4) null, dateOfBirth date null, certification bit null, salary money null, constraint PK_EMP PRIMARY KEY(empNumber), constraint EMP_STATECHECK CHECK(state in ('CA','FL')) ) GO • Job table (project 1) create...

  • QUESTIONS Q01: Use the comment feature of SQL to print your full name, AUID and username in three separate lines at the top of the script file. From this point onwards, you should use the comment fea...

    QUESTIONS Q01: Use the comment feature of SQL to print your full name, AUID and username in three separate lines at the top of the script file. From this point onwards, you should use the comment feature to separate your answers for each question. (0.2 mark) Q02: Write a SQL statement to retrieve all the rows from the Product table. All the columns should be renamed with proper spacing using the alias feature. For example, the UnitPrice column should be...

  • 4a) Create a new table that has one column called GoodID and 2 or 3 other...

    4a) Create a new table that has one column called GoodID and 2 or 3 other columns with whatever names and data types you want. But set up a Primary Key Constraint on the GoodID column. Use DESCRIBE to show the column definitions for your table, and paste that in here: 4b) INSERT one row into the table with GoodID equal to 13 and whatever other data (column values) you want. 4c) INSERT another row into the table with GoodID...

  • USING SQL 4. Show me the maximum rental duration and minimum rental duration from the film...

    USING SQL 4. Show me the maximum rental duration and minimum rental duration from the film table. Name the columns MaxRentalDuration and MinRentalDuration respectively. 5. List the actor ID, last name, and first name of each actor and the count of films (name column FilmCount) each is in for those actors who acted in more than 35 films. Order results by FilmCount. (Hint: You will need to use GROUP BY and HAVING in your query.)

  • Use the information from your production possibilities schedule to create your production possibilities curve by filling in the following graph

    Assignment: Determining Production Possibilities You are getting ready to open The Shoe Hut, but you need to need to determine whether you have the absolute or comparative advantage in the production of specific items. This will help you determine which product is the best for specialization. Your production possibilities are as follows: • You have the resources to produce up to 15 running shoe inserts. • You have the resources to produce up to 10 hiking boot inserts. • For every 2 hiking boot inserts produced, you...

  • Question:- Please create the 5*3 two dimensional data having numerical value by using pandas dataframe (You...

    Question:- Please create the 5*3 two dimensional data having numerical value by using pandas dataframe (You can give any name to the columns), please make sure that there should be at least one null value in each column. Once you are done with creating the matrix, please answer below questions:- (You have to do all the operations on jupyter notebook) e) Is there any way that you can put the restrictions on column wise or row wise to drop the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT