የ12ኛ ክፍል ውጤት ወጥቷል፤ ውጤትዎን የሚያዩበት መንገድ

የ12ኛ ክፍል የመረጃ ቴክኖሎጂ ምዕራፍ 3

Which columns, which rows: SELECT, WHERE and UPDATE

4 ደቂቃ · የተሠሩ 2 ያለፉ የፈተና ጥያቄዎች

የትምህርቱ ክፍሎች

ትምህርቱን ከዚያ ጀምሮ ለማጫወት አንድ ክፍል ይንኩ።

የ12ኛ ክፍል የመረጃ ቴክኖሎጂ ምዕራፍ 3 የ4 ደቂቃ የ Temari ቪዲዮ ትምህርት፦ Which columns, which rows: SELECT, WHERE and UPDATE። 2 ያለፉ የፈተና ጥያቄዎችን ደረጃ በደረጃ ይሠራል። ትምህርቱ በእንግሊዝኛ ነው።

ስለ ምዕራፍ 3 ተጨማሪ

የምዕራፉ ገጽ Temari በዚህ ምዕራፍ ላይ ያለውን ሌላውን ይዟል፤ ለምሳሌ አጭር ማስታወሻዎችና የመልመጃ ጥያቄዎች ከመልሶቻቸው ጋር።

የምዕራፍ 3 ገጽ ይክፈቱ

ትምህርቱ የሚናገረው ሁሉ

የትምህርቱ ቃላት በየክፍሉ። ትምህርቱን ከዚያ ጀምሮ ለማጫወት ሰዓቱን ይንኩ።

0:00Introduction

A database answers exactly what you ask it. In SQL, one part of a command chooses the columns, and another part chooses the rows. Leave the second part out, and the command reaches every row in the table. Let's see how that works.

0:18SELECT chooses the columns

SQL is the language you use to work with a database. A query starts with SELECT, then the columns you want, then FROM, and the table's name. SELECT * FROM COURSE; The asterisk, the star, means all columns in the table.

It is the same as listing every field by name. To see only some columns, list them, separated by commas. SELECT S_Fname, S_sex, FROM STUDENT; And spell each field name exactly as it is in the table.

0:54WHERE chooses the rows

Now the rows. To keep only some records, add a WHERE clause. WHERE S_sex = 'male'; Now only the male students come back. Text like male goes inside single quotation marks.

WHERE can compare too: equal, greater than, less than, and you can join conditions with AND or OR. WHERE is optional. Without it, you get every record. So remember the split. SELECT chooses the columns. WHERE chooses the rows.

1:29Practice question 1ያለፈ ፈተና

Here is a practice question. In an SQL SELECT statement, what does the asterisk symbol signify? Pause the video, and try it.

The asterisk after SELECT means all columns in the table. It is the same as listing every field by name. The answer is C. It has nothing to do with the primary key. Rows are chosen by WHERE, not by the star, so B is wrong too. And the star does not pick out number columns.

2:07UPDATE: WHERE decides how many

Now a command that changes data. UPDATE changes values in records that are already in a table. It does not add records, and it does not remove them. Look at this one. UPDATE Teacher, SET T_Salary = 15000, WHERE T_Salary < 10000; Only teachers earning less than ten thousand get the new salary.

Your book says it plainly. It is the WHERE clause that decides how many records are updated. So what if you leave WHERE out? Then the command changes the salary of every teacher in the table. DELETE works the same way. With no WHERE, it deletes all the records.

2:49Practice question 2ያለፈ ፈተና

Try this one. A school administrator in Hawassa executes the following SQL command. UPDATE Teacher SET T_Salary = 15000; What is the result of running this command? Pause, and try it.

Look for the WHERE clause. There isn't one. With no WHERE to choose the rows, the update reaches every record. So every teacher's salary becomes fifteen thousand birr. The answer is B. A is wrong: nothing limits it to the first row. C is wrong: WHERE can be left out, and then it simply changes every row. And D would need a WHERE clause, like the one we saw.

3:40Summary

So remember. After SELECT, the star means all columns. The WHERE clause chooses the rows. And an UPDATE or a DELETE with no WHERE reaches every record in the table. Keep practising questions like these on Temari.et.

ይህን ምዕራፍ በመተግበሪያው ይለማመዱ

Temari ይህን ምዕራፍ ወደ ጊዜ የተቆረጠለት መልመጃ ይለውጠዋል፣ እየሠሩ ያርምዎታል፤ ያልገባዎትንም የሚያብራራ የ AI አስተማሪ አለ።

በነጻ ይጀምሩ

Temari.et ለ Android ስልኮች መተግበሪያ አለው፤ በ Google Play ላይ በነጻ ይገኛል።

ይግቡመለያዎን ይክፈቱ