السلام عليكم ورحمة الله وبركاته

إخواني الكرم إليكم .. آخر أسئلة متوقعه تساعد الطلبة الدارسين للغه SQL على تخطي الإختبارات النظرية في هذا المجال، وقد تم تجميع الأسئلة والتأكد من صحه إجاباتها بنفسي من على الموقع التالي:


إضغط هنا



وأخيرا .. وأعتزر عن الإطاله عليكم .. إليكم الأسئلة:


كود:


Quiz	: 1. What does SQL stand for?
Ans.	: Structured Query Language

Quiz	: 2. Which SQL statement is used to extract data from a database?
Ans.	: SELECT

Quiz	: 3. Which SQL statement is used to update data in a database?
Ans.	: UPDATE

Quiz	: 4. Which SQL statement is used to delete data from a database?
Ans.	: DELETE

Quiz	: 5. Which SQL statement is used to insert new data in a database?
Ans.	:  INSERT INTO

Quiz	: 6. With SQL, how do you select a column named "FirstName" from a table 
       named "Persons"?
Ans.	: SELECT FirstName FROM Persons

Quiz	: 7. With SQL, how do you select all the columns from a table named 
                   "Persons"?
Ans.	: SELECT * FROM Persons

Quiz	: 8. With SQL, how do you select all the records from a table named "Persons" 
                   where the value of the column "FirstName" is "Peter"?
Ans.	: SELECT * FROM Persons WHERE FirstName='Peter'

Quiz	: 9. With SQL, how do you select all the records from a table named "Persons" 
                   where the value of the column "FirstName" starts with an "a"?
Ans.	: SELECT * FROM Persons WHERE FirstName LIKE 'a%

Quiz	: 10. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true
Ans.	: TRUE 




Quiz	: 11. With SQL, how do you select all the records from a table named 
                    "Persons" where the "FirstName" is "Peter" and the "LastName" is 
                    "Jackson"?
Ans.	: SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'

Quiz	: 12. With SQL, how do you select all the records from a table named 
                     "Persons" where the "LastName" is alphabetically between (and 
                      including) "Hansen" and "Pettersen"?
Ans.	: SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

Quiz	: 13. Which SQL statement is used to return only different values?
Ans.	: SELECT DISTINCT

Quiz	: 14. Which SQL keyword is used to sort the result-set?
Ans.	: ORDER BY

Quiz	: 15. With SQL, how can you return all the records from a table named 
                     "Persons" sorted descending by "FirstName"?
Ans.	: SELECT * FROM Persons ORDER BY FirstName DESC

Quiz	: 16. With SQL, how can you insert a new record into the "Persons" table?
Ans.	: INSERT INTO Persons VALUES ('Jimmy', 'Jackson')

Quiz	: 17. With SQL, how can you insert "Olsen" as the "LastName" in the 
                     "Persons" table?
Ans.	: INSERT INTO Persons (LastName) VALUES ('Olsen')

Quiz	: 18. How can you change "Hansen" into "Nilsen" in the "LastName" column in 
                     the Persons table?
Ans.	: UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

Quiz	: 19. With SQL, how can you delete the records where the "FirstName" is 
                      "Peter" in the Persons Table?
Ans.	: DELETE FROM Persons WHERE FirstName = 'Peter'

Quiz	: 20. With SQL, how can you return the number of records in the "Persons" 
                     table?
Ans.	: SELECT COUNT(*) FROM Persons


أرجو من الله أن تفيدكم جميعاً ...

وشكراً .. أخوكم في الله .. حسام الدين