STU_ STU_SNAME NUM 01 02 03 04 05 06 07 Snow Stark Lannister Lannister Greyjoy Tyrell Baratheon STU_FNAME STU_INITIAL STU_START DATE Jon Arya Jamie Cercei Theon Margaery Tommen E C с J | Y R 05-Apr-14 12-Jul-17 05-Sep-12 05-Sep-12 9-Dec-15 12-Jul-17 13-Jun-19 COURSE_ PROJ_ CODE NUM 201 305 101 101 402 305 201 6 11 2 2 Write the SQL code that will delete the Student table entirely. 14 10 5 Write the SQL code to change the course code to 304 for the person whose student number is 07. Write the SQL code to delete the row of the person named Jamie Lannister, who started on 5 September 2012, whose course code is 101 and project number is 2. Use logical operators to include all of the information given in this problem. Write the SQL code that will change the PROJ_NUM to 14 for all those students who started before 1 January 2016 and whose course code is at least 201. Write the SQL code that will delete all of the data inside a table, but not the table itself. with it, paste your code in a text file named Student.txt and save it in your task folder. Write the SQL code to create a table called Student. The table structure is summarised in the table below (Note that STU_NUM is the primary key): STU_NUM Attribute Name STU_SNAME STU_FNAME STU_INITIAL STU_STARTDATE COURSE_CODE PROJ_NUM STU STU_S STU_F STU_INITIAL NUM NAME NAME 01 02 Snow John E CHAR(6) After you have created the table in question 1, write the SQL code to enter the first two rows of the table as below: Stark Arya с VARCHAR(15) VARCHAR(15) CHAR(1) DATE CHAR(3) INT(2) Data Type STU_STARTDATE COURSE_ PROJ_ CODE NUM 05-Apr-14 12-Jul-17 201 305 6 11 Assuming all the data in the Student table has been entered as shown below, write the SQL code that will list all attributes for a COURSE_CODE of 305.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.



Step by step
Solved in 10 steps with 9 images









