| |

VerySource

 Forgot password?
 Register
Search
View: 1122|Reply: 11

Some views are not created with SQL statements, urgent, online, etc.

[Copy link]

4

Threads

27

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-2-8 15:30:01
| Show all posts |Read mode
Table 1: Student Situation Information Form XS
Student ID Name Professional Name Gender Birth Time Total Credits Remarks
Primary key

Table 2: Course schedule KC
Course number Course name Start semester Hours Credits
Primary key

Table III: Students and curriculum XS_KC
Student No. Course No. Grade Credits
Primary key primary key

Create view
1. Create a view CXS that contains only computer student records.
2. Create a view KC AVG containing the average grade of each course and try to modify the view. Can I use UPDATE to modify the data?
3. Create an encrypted view CW, including the student number, name, selected course name, and grade of the communication engineering girl. Try to modify the view. Can you use UPDATE to modify the data?
4. Compare the differences between the encrypted view and the normal view.
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 Uruguay

Post time: 2020-3-31 19:00:02
| Show all posts
1. Is there a lack of contrast between the major and the department?
2, since you want to modify the summary data, you should not use views, but tables
Reply

Use magic Report

4

Threads

27

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

 Author| Post time: 2020-3-31 21:45:01
| Show all posts
No, it ’s a teacher ’s topic, not an application. I ca n’t do this.
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-3-31 23:30:01
| Show all posts
ENCRYPTION

Encrypts entries in the sys.syscomments table that contain the text of the CREATE VIEW statement. Use WITH ENCRYPTION to prevent views from being published during SQL Server replication.


Encrypt only the statement that was created, not the data result
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-4-1 10:15:01
| Show all posts
1. create view cxs as
  select * from xs where professional name = 'Computer Department'
2. create view kc as
  select course name, avg (credits) from kc group by course name
.
.
.
.
.
.
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-4-2 13:30:02
| Show all posts
1 CREATE VIEW CXS AS
SELECT * FROM XS WHERE professional name = 'Computer'
(There is no relationship between the department and the professional, so you have to write directly-either there is a problem with the title, or you do not write the complete
2. CREATE VIEW CW AS
SELECT course number, course name, AVG (credits) FROM KC GROUP BY course number, course name
3. CREATE VIEW KC_AVG AS
SELECT A. Student ID, A. Name, B. Course Number, B. Course Name, C. Grade
FROM XS A, CW B, XS_KC C
WHERE A. Professional name = 'Communication Engineering' AND A. Gender = 'Female' AND A. Student ID = C. Student ID AND B. Course Number = C. Course Number
ENCRYPTION
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-4-2 14:15:01
| Show all posts
2. CREATE VIEW CW AS
SELECT course number, course name, AVG (credits) average credit FROM KC GROUP BY course number, course name
Reply

Use magic Report

4

Threads

27

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

 Author| Post time: 2020-4-2 22:15:01
| Show all posts
Problem with title ^ _ ^
Maybe I copied it wrong
Reply

Use magic Report

4

Threads

27

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

 Author| Post time: 2020-4-18 09:30:01
| Show all posts
2. Create a view KC AVG containing the average score of each course, try to modify the view, can you use UPDATE to modify the data?
This question is still wrong, who is online, help me
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-4-18 11:30:01
| Show all posts
2nd should be right

Create an attempt, and then try to update with the UPDATE statement to see if it succeeds
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list