TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ramón Miguel Quintana Rosa
1.7k
74
16.5k
Please i need to write somo querys fron only ONE TABLE
Nov 6 2019 12:04 PM
For the following table structure, "tPersona" has next fields:
rut as varchar, PK
FullName as varchar,
date Birth as date,
live as boolean,
rutPadre as varchar, FK
rutMadre as varchar, FK
● The rut field contains the person's identi ? cation and is the primary key of the tPersona table.
● The FullName field contains names and surnames and does not support nulls.
● The Birthdate field contains the day, month and year of birth and allows nulls.
● The rutPadre and rutMadre data fields are references to the primary registry key of the same tPersona table,
can have a null value (padro or unknown mother)
and do not guarantee relational integrity (the parent record was deleted, but the value was maintained from rutPadre).
● The live data field is TRUE if the person is alive and FALSE if the person. is dead, does not support nulls.
Exercise:
1. Develop the SQL script or pseudocode that lists all the people whose father and mother were born on the same day.
2. List the name of people who have only one parent, father or mother alive.
3. Update the rutPadre that points to a non-existent record.
In other words, the routine it contains does not correspond to any person's routine in the table.
Thank a lot
Reply
Answers (
0
)
how to know the MAX value in a Query
Select from multiple table MS SQL