-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Concepts: Keywords #4747
base: main
Are you sure you want to change the base?
Add Concepts: Keywords #4747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Danielmnm1
I've requested some changes. Please take a moment to address them. If you have any concerns or reasons to reject specific suggestions, feel free to discuss them.
Also, Please refer to style-guide. It is a general guide to entry standards, which will help reduce the number of potential edits that will further need to be made to your PR.
@@ -0,0 +1,73 @@ | |||
--- | |||
Title: 'Keywords' | |||
Description: 'MySQL keywords are predefined words that have special meaning in the SQL language. They are used to perform various operations within the database, such as creating tables, inserting data, querying the database, updating records, and more. Examples of MySQL keywords include SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, and ALTER.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description should be short, typically one sentence.
Tags: | ||
- 'MySQL' | ||
- 'Data' | ||
CatalogContent: # Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CatalogContent: # Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first | |
CatalogContent: |
- 'learn-example-course' | ||
- 'paths/example-path' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 'learn-example-course' | |
- 'paths/example-path' | |
- 'learn-sql' | |
- 'paths/analyze-data-with-sql' | |
- 'paths/data-science' | |
- 'paths/data-science-foundations' |
- 'learn-example-course' | ||
- 'paths/example-path' | ||
--- | ||
# MySQL Keywords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# MySQL Keywords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to include a title header. It is automatically provided by the metadata.
Keywords define the structure and syntax of SQL queries. They help organize the commands in a way that the MySQL database can interpret and execute. Each keyword performs a specific function such as selecting data (`SELECT`), inserting new records (`INSERT`), or modifying existing records (`UPDATE`). | ||
Using keywords ensures that your SQL queries are standarized, this enhances readability and maintainability of your code. | ||
|
||
### Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Danielmnm1,
Please add two separate sections: ##Syntax and ##Example.
In the Example section, include a table with a small number of rows and columns. like:
CREATE TABLE products (
name VARCHAR(50),
price DECIMAL(10, 2),
quantity_in_stock INT
);
INSERT INTO products (name, price, quantity_in_stock) VALUES
('Product A', 19.99, 10),
('Product B', 5.99, 20),
('Product C', 49.99, 5);
INSERT INTO table_name (column1, column2) VALUES (value1, value2); | ||
``` | ||
|
||
## Common Keywords |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this section and include its content in the Example section.
Also, Please ensure the header and paragraph are separated by a line.
@Danielmnm1 It's been more than a week. Could you please make the requested changes as soon as possible? |
I fixed the branch issue, please let me know your comments. Thank you. |
@letsbuildanything Please check if your required changes are reflected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Danielmnm1 I've requested some more changes. Please take a moment to address them. If you have any concerns or reasons to reject specific suggestions, feel free to discuss them.
MySQL **keywords** are predefined words that have special meaning in the SQL language. They are used to perform various operations within the database, such as creating tables, inserting data, querying the database, updating records, and more. Examples of MySQL keywords include SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, and ALTER. | ||
|
||
## Importance and Usage | ||
|
||
Keywords define the structure and syntax of SQL queries. They help organize the commands in a way that the MySQL database can interpret and execute. Each keyword performs a specific function such as selecting data (`SELECT`), inserting new records (`INSERT`), or modifying existing records (`UPDATE`). | ||
Using keywords ensures that your SQL queries are standarized, this enhances readability and maintainability of your code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine and condense these statements. Remove the "Importance and Usage" section and ensure the whole statement is free of redundancy.
Keywords define the structure and syntax of SQL queries. They help organize the commands in a way that the MySQL database can interpret and execute. Each keyword performs a specific function such as selecting data (`SELECT`), inserting new records (`INSERT`), or modifying existing records (`UPDATE`). | ||
Using keywords ensures that your SQL queries are standarized, this enhances readability and maintainability of your code. | ||
|
||
## Syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the entire Syntax section. I know I suggested adding it in the last review, and I apologize for any inconvenience this may cause.
Replace it with the following section:
Common MySQL Keywords
Here's a table of some commonly used MySQL keywords along with their definitions:
Keyword Definition SELECT Retrieves data from one or more tables FROM Specifies the table(s) to retrieve data from WHERE Filters the results based on a condition INSERT Adds new data into a table UPDATE Modifies existing data in a table DELETE Removes data from a table CREATE Creates a new database object (e.g., table, index) ALTER Modifies the structure of an existing database object DROP Removes a database object JOIN Combines rows from two or more tables GROUP BY Groups rows that have the same values in specified columns HAVING Specifies a search condition for a group or an aggregate ORDER BY Sorts the result set in ascending or descending order LIMIT Specifies the maximum number of rows to return in the result set UNION Combines the result sets of two or more SELECT statements
Feel free to edit and improve as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end, please refer to the official documentation of MySQL KEYWORDS for the comprehensive list.
### CREATE | ||
|
||
```SQL | ||
CREATE TABLE employees ( | ||
id INT AUTO_INCREMENT PRIMARY KEY, | ||
first_name VARCHAR(50), | ||
last_name VARCHAR(50), | ||
position VARCHAR(100), | ||
salary DECIMAL(10, 2), | ||
hire_date DATE | ||
); | ||
``` | ||
|
||
### INSERT | ||
|
||
```SQL | ||
INSERT INTO employees (first_name, last_name, position, salary, hire_date) | ||
VALUES ('John', 'Doe', 'Software Engineer', 75000.00, '2024-05-25'); | ||
``` | ||
|
||
### SELECT | ||
|
||
```SQL | ||
SELECT first_name, last_name | ||
FROM employees | ||
WHERE position = 'Software Engineer'; | ||
``` | ||
|
||
### UPDATE | ||
|
||
```SQL | ||
UPDATE employees | ||
SET salary = 80000.00 | ||
WHERE id = 1; | ||
``` | ||
|
||
### DELETE | ||
|
||
```SQL | ||
DELETE FROM employees | ||
WHERE id = 1; | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest combining the use cases of different keywords into one comprehensive example. Like this:
Example
The following example demonstrates the use of several MySQL keywords:
-- Create a new table CREATE TABLE employees ( id INT AUTO_INCREMENT PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), position VARCHAR(100), salary DECIMAL(10, 2), hire_date DATE ); -- Insert a new employee INSERT INTO employees (first_name, last_name, position, salary, hire_date) VALUES ('John', 'Doe', 'Software Engineer', 75000.00, '2024-05-25'); -- Select specific employees SELECT first_name, last_name FROM employees WHERE position = 'Software Engineer';
- Feel free to edit and improve as needed.
- Wherever possible, Please add the output section.
Description
Issue Solved
Closes #4679
Type of Change
Checklist
main
branch.Issues Solved
section.