[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-718158-105":59,"doc-detail-718158-en":130,"doc-similar-718158":162},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","worksheet-with-solution-sql-sql-answers","WORKSHEET WITH SOLUTION SQL - SQL - Answers","","A SQL worksheet with solution covering core query concepts and MySQL syntax. It explains DDL vs DML, commands for altering tables, searching NULLs, describing table structure, pattern matching with LIKE using % and _, sorting with ORDER BY and DESC, removing duplicates with DISTINCT, and basic constraints such as the minimum column count for table creation. It also includes practical correction questions for WHERE/LIKE, NULL handling, department filters, and clause ordering errors, plus join differences, aggregate and count behavior, and a delete-all-records selection.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/worksheet-with-solution-sql-sql-answers/718158/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/worksheet-with-solution-sql-sql-answers/718158.png","ImageObject",300,407,{"name":92,"@type":93},"Emma Wilson","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-21","2026-11-16",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are DDL and DML in SQL?","Question",{"text":112,"@type":113},"DDL (Data Definition Language) defines or changes database objects such as tables. DML (Data Manipulation Language) manipulates stored data such as inserting, updating, or deleting records.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How do you search for NULL values in a column?",{"text":117,"@type":113},"Use the IS NULL clause, e.g., commission IS null.",{"name":119,"@type":110,"acceptedAnswer":120},"What is the difference between COUNT() and COUNT(*)?",{"text":121,"@type":113},"COUNT() excludes NULL values for the specified column, while COUNT(*) counts all rows returned in the query output, including rows with NULLs.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},718158,1794854371,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":19,"preview_urls":145},3848291630094,"https://eur-avatar.wpscdn.com/davatar_085a072bc5b1113ac321206ff7593b45","| WORKSHEET WITH SOLUTION SQL (CS & IP)\u003Cbr>1 What are DDL and DML? Give one command of each. |\n| --- |\n| Ans. DDL stands for Data Definition Language. DDL commands are used to manipulate the database objects like database, table, views etc. In simple words DDL commands are used to create table, changing the structure of table or dropping the table. Example: CREATE, ALTER & DROP\u003Cbr>DML stands for Data Manipulation Language. DML commands are used to manipulate the information stored in a table. Like adding new records, changing existing records or deleting the records. Example: INSERT, UPDATE & DELETE |\n| 2 Which command is used to add new column in existing table? |\n| \u003Cbr> Ans.  ALTER TABLE  |\n| 3 Which clause is used to search for NULL values in any column? |\n| \u003Cbr> Ans.  IS NULL  |\n| 4 Which command is used to see information like name of columns, data type, size etc. ? |\n| \u003Cbr> Ans.  DESCRIBE OR DESC  |\n| 5 Which clause is used for pattern matching? What are the 2 main characters used for matching the pattern? |\n| \u003Cbr>Ans.\u003Cbr>LIKE\u003Cbr>%(percent) and _ (underscore) |\n| 6 Which clause is used to see the output of query in ascending or descending order? |\n| \u003Cbr> Ans.  ORDER BY  |\n| 7 Which clause is used to eliminate the duplicate rows from output? |\n| \u003Cbr> Ans.  DISTINCT  |\n| 8 What is the minimum number of column required in MySQL to create table? |\n| \u003Cbr> Ans.  ONE (1)  |\n| 9 Which command is used to remove the table from database? |\n| \u003Cbr> Ans.  DROP TABLE  |\n| 10 Which command is used to add new record in table? |\n| \u003Cbr> Ans.  INSERT INTO  |\n| 11 Which option of ORDER BY clause is used to arrange the output in descending order? |\n| \u003Cbr> Ans.  DESC  |\n| 12 Which command is used to change the existing information of table? |\n| \u003Cbr> Ans.  UPDATE  |\n| 13 Raj is a database programmer, He has to write the query from EMPLOYEE table to search for the employee whose name begins from letter „R‟, for this he has written the query as:\u003Cbr>SELECT * FROM EMPLOYEE WHERE NAME=‟R%‟;\u003Cbr>But the query is not producing the correct output, help Raj and correct the query so that he gets the desired output. |\n| \u003Cbr> Ans.  SELECT * FROM EMPLOYEE WHERE NAME LIKE ‟R%‟;  |\n| 14 Raj is a database programmer, He has to write the query from EMPLOYEE table to search for the employee who are not getting any commission, for this he has written the query as:\u003Cbr>SELECT * FROM EMPLOYEE WHERE commission=null;\u003Cbr>But the query is not producing the correct output, help Raj and correct the query so that he gets the desired output. |\n| \u003Cbr> Ans.  SELECT * FROM EMPLOYEE WHERE commission IS null;  |\n| 15 Raj is a database programmer, has to write the query from EMPLOYEE table to search for the employee who are working in „Sales‟ or „IT‟ department, for this he has written the query as: SELECT * FROM EMPLOYEE WHERE department=‟Sales‟ or „IT‟;\u003Cbr>But the query is not producing the correct output, help Raj and correct the query so that he gets the desired output. |\n| \u003Cbr>Ans.\u003Cbr>SELECT * FROM EMPLOYEE WHERE department=‟Sales‟ or department= „IT‟;\u003Cbr>SELECT * FROM EMPLOYEE WHERE department IN (‘Sales’,’IT’) OR |\n| |\n\n\n| 16 | The following query is producing an error. Identify the error and also write the correct query. SELECT * FROM EMP ORDER BY NAME WHERE SALARY>=5000; |  |  |  |  |\n| --- | --- | --- | --- | --- | --- |\n| Ans. | As per MySQL, ORDER BY must be the last clause in SQL QUERY, and in this query ORDER BY is used before WHERE which is wrong, the correct query will be:\u003Cbr>SELECT * FROM EMP WHERE SALARY>=5000 ORDER BY NAME; |  |  |  |  |\n| 17 | If Table Sales contains 5 records and Raj executed the following queries; find out the output of both the query.\u003Cbr>(i) Select 100+200 from dual;\u003Cbr>(ii) Select 100+200 from Sales; |  |  |  |  |\n| Ans. | (i)(ii)\u003Cbr>300300300300300300 |  |  |  |  |\n| 18 | What is the difference between Equi-Join and Natural Join? |  |  |  |  |\n| Ans. | In Equi join we compare value of any column from two tables and it will return matching ","cbCaiiKMNLvQLxp1","https://ap.wps.com/l/cbCaiiKMNLvQLxp1","pdf",1055223,14,"English","# DDL and DML Basics\n## CREATE, ALTER, DROP vs INSERT, UPDATE, DELETE\n# Core SQL Clauses and Commands\n## ALTER TABLE, IS NULL, DESCRIBE/DESC, LIKE, ORDER BY, DISTINCT\n# Data Operations and Conditions\n## INSERT INTO, DROP TABLE, UPDATE, DESC\n# Query Correction Practice\n## WHERE/LIKE, NULL checks, department filtering, ORDER BY vs WHERE\n# Joins and Output Evaluation\n## Equi-Join vs Natural Join\n# Functions and Aggregations\n## AVG(), COUNT() vs COUNT(*)\n# SQL Fundamentals Questions\n## SQL full form, deleting records without deleting table","[{\"question\":\"What are DDL and DML in SQL?\",\"answer\":\"DDL (Data Definition Language) defines or changes database objects such as tables. DML (Data Manipulation Language) manipulates stored data such as inserting, updating, or deleting records.\"},{\"question\":\"How do you search for NULL values in a column?\",\"answer\":\"Use the IS NULL clause, e.g., commission IS null.\"},{\"question\":\"What is the difference between COUNT() and COUNT(*)?\",\"answer\":\"COUNT() excludes NULL values for the specified column, while COUNT(*) counts all rows returned in the query output, including rows with NULLs.\"}]","WORKSHEET WITH SOLUTION SQL - SQL - Answers | PDF",35,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/edd4a957bc5048700ecf1a6ded01e7bd.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/bd4d56f7e6677eb8c0dc885219e61fee.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/6894816eb1bd5c170d097f5e75207d1a.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/7e8ebbea96287eff1004d9f9fdcda727.webp",980,1268,{"list":163,"token":66},[164,170,176,182,188,195,201,208,214,220],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":29,"category_name":20,"create_tm":169},718161,"SQL Interview Questions and Answers - Most Frequently Asked SQL Interview Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230019199641/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=vcHbeSwqYIp2QzXQcY5px5APeEM%3D","sql-interview-questions-and-answers-most-frequently-asked-sql-interview-questions",1794854380,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":56,"category_name":20,"create_tm":175},391282,"TCS NQT Interview Questions for Freshers - Technical Interview Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917375092/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=Lxii5u6WgAS4ZAby9uLfUgBgZZs%3D","tcs-nqt-interview-questions-for-freshers-technical-interview-questions",1790351065,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":24,"category_name":20,"create_tm":181},718153,"SQL Interview Questions and Answers - SQL basics - data definition, manipulation, control, transactions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230019199616/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=WsdynfpKkmSbNKeHTwpj55cQYSM%3D","sql-interview-questions-and-answers-sql-basics-data-definition-manipulation-control-transactions",1794854355,{"doc_id":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":81,"category_name":20,"create_tm":187},730041,"98-364 Database Administration Fundamentals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230030237321/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=B%2FNC94taNQ9QN0kucK0fMsp3MNA%3D","98-364-database-administration-fundamentals",1795303206,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":193,"category_name":20,"create_tm":194},391529,"Top Accenture SQL Interview Questions and Answers - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917385245/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=Vrfc0kgOEdnQbzKPM7rwdx%2Bx6l4%3D","top-accenture-sql-interview-questions-and-answers-read-online-free",16,1790353902,{"doc_id":196,"doc_title":197,"file_type":137,"home_preview_img_url":198,"slug":199,"view_count":24,"category_name":20,"create_tm":200},718156,"800-SQL-Server-questions - SQL Server Interview Questions Answers (More Than 800)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230018609964/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=lYBHnElGaaaaJyGVnMmXd6hrapg%3D","800-sql-server-questions-sql-server-interview-questions-answers-more-than-800",1794854364,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":206,"category_name":20,"create_tm":207},656144,"Databases Exam - 22 March 2019 - Exam Instructions and Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975301640/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=Kp0C07pYQGAwCRcX7871Dp%2BhkjE%3D","databases-exam-22-march-2019-exam-instructions-and-questions",17,1792966704,{"doc_id":209,"doc_title":210,"file_type":137,"home_preview_img_url":211,"slug":212,"view_count":206,"category_name":20,"create_tm":213},391747,"62 SQL Coding interview questions to ask your applicants","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917705140/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=liQk2v6nab%2FAjgrZfbrYB0XYQis%3D","62-sql-coding-interview-questions-to-ask-your-applicants",1790358419,{"doc_id":215,"doc_title":216,"file_type":137,"home_preview_img_url":217,"slug":218,"view_count":44,"category_name":20,"create_tm":219},497965,"Test of Basic Knowledge of SQL - SQL practice test questions and answer key","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229930310506/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=FiHACm%2BUUYv6a0g8h3xyM%2FzKVrA%3D","test-of-basic-knowledge-of-sql-sql-practice-test-questions-and-answer-key",1790972537,{"doc_id":221,"doc_title":222,"file_type":137,"home_preview_img_url":223,"slug":224,"view_count":56,"category_name":20,"create_tm":225},391653,"Meta Data Engineer Initial Interview Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917399251/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796202779&Signature=BPIY22pE5zxWoG5EhRGXmFgzEbg%3D","meta-data-engineer-initial-interview-guide",1790356632]