Database Concepts (7th Edition)
Database Concepts (7th Edition)
7th Edition
ISBN: 9780133544626
Author: David M. Kroenke, David J. Auer
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 3, Problem 3.47RQ
Program Plan Intro

SQL:

  • SQL stands for “Structured Query Language”.
  • The current version of SQL is “ANSI SQL – 92”.
  • It contains constructs which are used to define and process database. They are executed using DBMS-supplied command prompt.
  • SQL is not a programming language. It is text-based and it is also called as data sublanguage. In order to get SQL as a complete programming language, it should be included in scripting languages like Java, C#, and so on.

ALTER TABLE Statement:

“ALTER TABLE” statement comes under Data Definition Language. It is used to modify column, add constraints, add column(s), drop column, rename column name and table name, drop constraints, and so on. To add a new column, “ADD COLUMN” keyword should be used after mentioning the table name.

Syntax:

Syntax to add a column to an existing table is as follows: (The below query was executed in SQL Server Management Studio).

ALTER TABLE table_Name ADD COLUMN column_Name datatype;

Blurred answer
Students have asked these similar questions
Write a PL/SQL Function that accepts 4 integers, 2 representing the homeTeamID and visitorTeamID, and the other 2 representing the score for each team during a game : htscore and vtscore The function will determine which team won the match and return the teamID of the winning team. You can achive this by comparing htscore > or < then vtscore.. if htscore is bigger then return hteamID or else return vteamID. If the game was a tie (the 2 scores are the same value) return a 0.
Write the SQL statements using the university schema to perform the followingoperations: Delete all takes tuples corresponding to any section of any course withthe word “advanced” as a part of the title; ignore case when matching theword with the title.
Develop a PL/SQL block that would go through all the employees from EMPLOYEES table who work in department id= 90 (there is suppose to be 3 employee who work in Department 90)- IN BEGIN END END SECTION; Execute 3 separate of SELECT statement one after the other. Each SELECT will pull first name. salary of each employee and store them in local variables.+ SELECT LOAD INTO v_firstname1, v_salarxlWHERE emrlexee.id=100 Then second WHERE emploxee.id3101+ SELECT first_name, salary INTO v_firstname2, v_salary2 Then third + SELECTSELECTI tirst.name, salary INTO v_firstname3, v_salary3 iin WHERE emploxee id=102 ..... You must now have 6 local variables. DECLARE all of them accordingly in DECLARE section and use them in BEGIN and END.+ Then add another SELECT statement in BEGIN-END to find company average salary SELECT xa(salary) INTO aKasal FROM EMPLOYEES; !!! Do not forget to create y avgsal local variable in DECLARE section.

Chapter 3 Solutions

Database Concepts (7th Edition)

Knowledge Booster
Background pattern image
Computer Science
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.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education