Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

Europe mySQL Hosting - HostForLIFEASP.NET :: MySQL Queries Cheat Sheet

clock April 19, 2024 08:28 by author Peter

One of the most widely used and adaptable database management system platforms is MySQL. Regardless of your position in the database industry or amount of development experience, it is imperative that you are familiar with MySQL and its querying features. The fundamentals of MySQL querying will be covered in this tutorial, along with easy to use techniques for connecting to your databases.

A few simple SQL queries
CHOOSE Information from one or more columns of a table can be obtained using this technique. You enter the desired columns, separated by commas, after the SELECT keyword.

SELECT column1, column2 FROM tablename;
SELECT * FROM tablename;


WHERE Records can be filtered using this clause depending on specific requirements. You can only obtain the rows that match the given criteria.
SELECT *FROM tablename
WHERE columnname = value;


INSERT To add new records (rows) to a table, use this statement. The values you wish to add to each column and the name of the table are also specified.

INSERT INTO tablename (column1, column2)
VALUES (value1, value2);


UPDATE A table's existing records can be changed using this statement. The table name, the columns you wish to change, and the new values are all specified.
UPDATE tablename
SET column1 = newvalue
WHERE condition;


DELETE  Depending on specific requirements, this statement is used to remove records from a table. You can use it to remove particular rows that fit the requirements.
DELETE FROM tablename
WHERE condition;


JOIN This joins rows from one or more tables together according to a shared column. With just one query, you can obtain data from several tables.
SELECT *
FROM table1
JOIN table2 ON table1.columnname = table2.columnname;


GROUP BY Rows with the same values are grouped together into summary rows using this clause. It is frequently used to calculate values on grouped data together with aggregate functions such as COUNT, SUM, AVG, etc.
SELECT columnname, COUNT(*)
FROM tablename
GROUP BY columnname;

ORDER BY Depending on one or more columns, this clause can be used to sort the result set either ascending (ASC) or descending (DESC).
SELECT *
FROM tablename
ORDER BY columnname ASC;


LIMIT This has the function of limiting how many rows are returned in a result set. It is frequently used to increase query efficiency by obtaining only a subset of rows, or for pagination.
SELECT *
FROM tablename
LIMIT 10;


DISTINCT This term pulls distinct rows out of a column. Duplicate rows are removed from the result set.
SELECT DISTINCT columnname
FROM tablename;


Data Manipulation Functions

COUNT This function counts the number of rows that satisfy a certain criteria or the total number of rows in a table.
SELECT COUNT(*)
FROM tablename;


MAX/MIN The maximum and minimum values from a column can be obtained, respectively, using these functions.
SELECT MAX(columnname), MIN(columnname)
FROM tablename;


AVG The average value of a numeric column can be determined with this function.
SELECT AVG(columnname)
FROM tablename;


SUM The total of the values in a numeric column can be determined using this function.
SELECT SUM(columnname)
FROM tablename;

Constraints
PRIMARY KEY The primary key constraint is responsible for uniquely identifying every record within a table. It guarantees that every table row has a distinct identity.
CREATE TABLE tablename (
    columnname INT PRIMARY KEY,
    ...
);


FOREIGN KEY  By referencing the primary key or unique key of another table, this constraint creates a relationship between tables.
CREATE TABLE tablename1 (
    columnname INT,
    FOREIGN KEY (columnname) REFERENCES table_name2(columnname)
);

INDEX  By based an index on one or more columns, this technique helps to speed up data retrieval operations on a table. Based on the indexed columns, it enables the database engine to find rows rapidly.
CREATE INDEX indexname
ON tablename (columnname);

Conclusion
The SQL cheat sheet offers a quick reference for effectively carrying out crucial database practices. It includes a wide range of operations, from simple commands like SELECT, INSERT, UPDATE, and DELETE for data retrieval, addition, and modification to more complex techniques like JOIN for merging data from various tables and GROUP BY for data summary. The cheat sheet also contains constraints like PRIMARY KEY, FOREIGN KEY, and INDEX, as well as data manipulation methods like COUNT, MAX, MIN, AVG, and SUM, which are essential for maintaining the accuracy of data and maximising database performance.



AngularJS Hosting Europe - HostForLIFE :: How to Getting Started With Angular 18 And Create A Small Application?

clock April 1, 2024 07:27 by author Peter

Angular team will release the latest version of Angular on May 20, 2024.

Now, we can create a new Angular 18 application.
ng new Angular18Galaxy

Compared to the older version project creation is very fast in Angular 18.

As you can see, Angular 18 has relatively small bundle sizes. The performance of the application will be enhanced.

Currently I am getting one issue while running the application.

Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f optimized info should be defined
Vite Error, /@fs/D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create
a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f optimized info should be defined
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_platform-browser.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_router.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`.
3:35:24 pm [vite] Pre-transform error: The file does not exist at "D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/.angular/cache/18.0.0-next.1/vite/deps/@angular_core.js?v=0a089e0f" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to `optimizeDeps.exclude`. (x2)
3:35:25 pm [vite] Pre-transform error: Failed to load url D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/node_modules/vite/dist/client/env.mjs (resolved id: D:/Work/Community/C# Corner/C# Corner Article 134 Getting started with Angular 18 and create a basic application/Angular18Galaxy/node_modules/vite/dist/client/env.mjs) in D:/Work/Community/C. Does the
file exist?
ERROR RuntimeError: NG04002: Cannot match any routes. URL Segment: '@fs/D:/Work/Community/C'
    at Recognizer.noMatchError (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2702:12)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2734:20)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:1729:33)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:822:9)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24) {
  code: 4002
}
ERROR RuntimeError: NG04002: Cannot match any routes. URL Segment: '@id/D:/Work/Community/C'
    at Recognizer.noMatchError (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2702:12)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:2734:20)
    at eval (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:1729:33)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:822:9)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24)
    at OperatorSubscriber.error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:558:12)
    at OperatorSubscriber._error (eval at instantiateModule (file:///D:/Work/Community/C%23%20Corner/C%23%20Corner%20Article%20134%20Getting%20started%20with%20Angular%2018%20and%20create%20a%20basic%20application/Angular18Galaxy/node_modules/vite/dist/node/chunks/dep-BBHrJRja.js:55003:28), <anonymous>:581:24) {
  code: 4002
}


Hope Angular team will resolve this issue sooner.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in