1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gala2k [10]
3 years ago
6

Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m

any foreign keys are defined in the AP database?
Computers and Technology
1 answer:
Nutka1998 [239]3 years ago
6 0

Answer:

SELECT COUNT (DISTICT constraint_name)

FROM apd_schema.constraint_column_usage

RUN

Explanation:

General syntax to return a catalog view of information about foreign keys.

SELECT DISTINCT PARENT_TABLE =

           RIGHT(Replace(DC.constraint_name, 'fkeys_', ''),

           Len(Replace(DC.constraint_name, 'fkeys_', '')) - Charindex('_', Replace(DC.constraint_name, 'fkeys_', ''))),

           CHILD_TABLE = DC.table_name,

           CCU.column_name,

           DC.constraint_name,

           DC.constraint_type

FROM apd_schema.table_constraints DC

INNER JOIN apd_schema.constraint_column_usage CCU

           ON DC.constraint_name = CCU.constraint_name

WHERE  DC.constraint_type LIKE '%foreign'

           OR DC.constraint_type LIKE '%foreign%'

           OR DC.constraint_type LIKE 'foreign%'

RUN

You might be interested in
Create a base class named rectangle that contains lenght and width data members.
kumpel [21]

Answer:

class Rectangle:  

   

   def __init__(self, length, width):

       self.length = length

       self.width = width

       

   

   def area(self):

       area = self.length*self.width

       return area

   

   

class Box (Rectangle):

   

   def __init__(self, length, width, height):

       super().__init__(length, width)

       self.height = height

       

   def volume(self):

       volume = self.length * self.width * self.height

       return volume

   

   def area(self):

       area = 2*(self.length*self.width) + 2*(self.length*self.height) + 2*(self.width*self.height)

       return area

rec_1 = Rectangle(2,4)

box_1 = Box(2,2,6)

print(box_1.length)

print(box_1.area())

   

print(rec_1.length)

print(rec_1.area())

Explanation:

The programming language used is python.

class Rectangle

The class Rectangle is created with attributes length and width.

The class attributes are initialized using the __init__ constructor.

In the rectangle class, a method/function is declared to return the area of the rectangle.

class Box

This class is a child of rectangle and it inherits all its attributes and methods,

It has an additional attribute of depth and its constructor is used to initialize it.

The class contains a volume function, that returns the volume and an override function 'area()' that displaces the area from the parent class.

Finally, some instances of both classes are created.

4 0
3 years ago
E-governance is the only solution against corruption. justify the statement in context of nepal​
notka56 [123]

Answer:

Following are the solution to this question:

Explanation:

The E-government implies use as part of the government systems to offer SMART, which is used to manage smart governance, ethics or accountability, sensitivity, and transparency. It is the research teams, that also shown that policies were progressing in India's creation of information technology. It is also argued against reducing the risk of bribery through improved public official surveillance and reducing its need for citizen engagement with porters with key services.

6 0
3 years ago
Question 12
AlladinOne [14]

Which is a multicast address ?

ans: 241.2.2.1

6 0
2 years ago
Who is the best Zelda character
Flura [38]
They’re all pretty good!
7 0
2 years ago
Read 2 more answers
When the + operator is used with strings, it is known as the?
Darya [45]
Concatenation, which mean we combine two or more strings into one.
5 0
3 years ago
Other questions:
  • In java write a program:A contact list is a place where you can store a specific contact with other associated information such
    8·1 answer
  • Enhancing and optimizing customer retention and loyalty is a major business strategy.
    15·1 answer
  • The operating system of a computer is an example of ________ software. science-forum
    7·1 answer
  • The following algorithm computes the average height for a list of basketball player heights. Initialize a variable sum to 0. For
    11·2 answers
  • Variable-length entities. fixed-length entities. data structures that contain up to 10 related data items. used to draw a sequen
    14·1 answer
  • When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do
    7·1 answer
  • On his website, Mario has a video that visitors must click to play. He wants the video to play automatically when the page loads
    8·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary?
    6·2 answers
  • What is a program that includes a function parameter capable of doing?
    8·1 answer
  • Compare and contrast hardware and software.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!