I'm trying to edit column DEGREE_TYPE_MAJOR to DEGREE_TYPE and add a column MAJOR in Snowflake. How can I do this?
I'm trying to edit column DEGREE_TYPE_MAJOR to DEGREE_TYPE and add a column MAJOR in Snowflake. How can I do this?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
I'm trying to edit column DEGREE_TYPE_MAJOR to DEGREE_TYPE and add a column MAJOR in Snowflake. How can I do this?

Transcribed Image Text:### Database Table Creation and Modification
#### SQL Script
The SQL script demonstrates the creation and modification of a table named `TUITIONASSIST` in a database. Below is the explanation of each SQL command:
1. **Table Creation**
```sql
CREATE TABLE TUITIONASSIST(
Employee_ID INT PRIMARY KEY,
Employee_Name VARCHAR(40),
Application_Status VARCHAR(30),
Applied_Date DATE,
Total_Paid_Amount FLOAT,
Degree_Type VARCHAR(50),
Major VARCHAR(50),
School_Name VARCHAR(50)
);
```
- **Employee_ID**: An integer serving as the primary key for uniquely identifying each entry.
- **Employee_Name**: A variable character field with a maximum length of 40 characters.
- **Application_Status**: A variable character field, up to 30 characters, indicating the application's status.
- **Applied_Date**: A date field showing when the application was submitted.
- **Total_Paid_Amount**: A floating-point number representing the total amount paid.
- **Degree_Type**, **Major**, **School_Name**: All are variable character fields with a 50 character limit, specifying the degree type, major, and school name respectively.
2. **Column Renaming**
```sql
ALTER TABLE TUITIONASSIST RENAME COLUMN degree_type_major TO degree_type;
```
- This command renames the column `degree_type_major` to `degree_type`.
3. **Data Selection**
```sql
SELECT * FROM "HRPA_TEST"."DBO"."TUITIONASSIST";
```
- This query retrieves all records from the `TUITIONASSIST` table, which is under the `"HRPA_TEST"."DBO"` schema.
### Data Preview
There is a section for data preview, labeled `Table: HRPA_TEST.DBO.TUITIONASSIST`, indicating where you would see data entries once they exist. The listed columns include:
- **EMPLOYEE_ID**
- **EMPLOYEE_NAME**
- **APPLICATION_STATUS**
- **APPLIED_DATE**
- **TOTAL_PAID_AMOUNT**
- **DEGREE_TYPE_MAJOR**
- **SCHOOL_NAME**
Currently, the data preview displays 0 rows, indicating that there are no entries in the table at the moment.
This setup allows for managing and querying a database designed to handle tuition assistance information for employees.
Expert Solution

Step 1
The queries are given in the below step with output screenshots after each query.
Happy to help you ?
Step by step
Solved in 2 steps with 3 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education