Updating multiple records in this year with information held in previous year

0 votes

Hi,

I’m new to SQL and would really appreciate some advice.

I need to update multiple records (student records so they have a unique ID) with data held against the student in a previous year.  So student A had QoE of ‘04’ in 19/20, how do I set the 20/21 QoE field to what it was in 19/20 for all students in one query?

Many Thanks in Advance,

Sarah

Nov 7, 2020 in Database by SarahJ
• 120 points
172 views

1 answer to this question.

0 votes

Hello,

For your query you can refer this:https://www.plus2net.com/sql_tutorial/sql_update.php

Hope it helps you!!

answered Nov 9, 2020 by Niroj
• 82,800 points

Related Questions In Database

0 votes
2 answers

What are the ways to get the count of records in a table

With the help of the SQL count ...READ MORE

answered Aug 20, 2020 in Database by Okugbe
• 280 points
1,260 views
0 votes
1 answer

Can I have multiple primary keys in a single table?

A Table can have a Composite Primary Key which ...READ MORE

answered Oct 25, 2018 in Database by Frankie
• 9,810 points
1,988 views
0 votes
1 answer

Query to list number of records in each table in a database

Use the below code to list number of ...READ MORE

answered Oct 11, 2019 in Database by Omaiz
• 560 points
409 views
0 votes
1 answer

Database Repair Options in Cassandra

Anti Entropy: Anti-entropy Repair is a process of ...READ MORE

answered Jun 28, 2018 in Database by kurt_cobain
• 9,390 points
977 views
0 votes
1 answer

Which query to use for better performance, join in SQL or using Dataset API?

DataFrames and SparkSQL performed almost about the ...READ MORE

answered Apr 19, 2018 in Apache Spark by kurt_cobain
• 9,390 points
769 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by Parth
• 4,630 points
695 views
0 votes
1 answer
0 votes
1 answer

Automating Oracle script with nolio

Depending upon the details of your script ...READ MORE

answered Jul 17, 2018 in Other DevOps Questions by ajs3033
• 7,280 points
268 views
0 votes
1 answer

Sir please tell me how to import image in database?

Hello soumadip, (Assuming you are using mysql database) You ...READ MORE

answered Apr 1, 2020 in Database by Niroj
• 82,800 points
204 views
0 votes
1 answer

How do I kill all the processes in Mysql “show processlist”?

Hello kartik, Mass killing operation saves time. Do it ...READ MORE

answered May 4, 2020 in Database by Niroj
• 82,800 points
424 views