![]() INSERT: This statement allows you to insert one or more rows in the table. The intermediate commands are listed below.ġ1. Syntax: SELECT Column1, Column2 FROM Column3 IS NULL Įxample: SELECT EMP_ID, EMP_NAME FROM EMPLOYEE WHERE EMP_SAL IS NULL Intermediate MySQL Query Commands IS NULL: This is used for checking the value or retrieving the data for the particular column is null. Syntax: SELECT Column1, Column2 FROM EMPLOYEE WHERE Column3 BETWEEN val1 AND val2 Įxample: SELECT EMP_ID, EMP_NAME FROM EMPLOYEE WHERE EMP_SAL BETWEEN 20 ġ0. BETWEEN: It is used to range the data between the two conditions. Syntax: SELECT COLUMN1, COLUMN2 FROM WHERE COLUMN1 Like’’ Įxample: SELECT EMP_ID, EMP_NAME, EMP_SALARY FROM EMPLOYEE WHERE EMP_NAME like‘SA%’ ĩ. LIKE: This MySQL Query Command is used to retrieve the data from the table for the specific pattern. Syntax: SELECT COLUMN1, COLUMN2, FROM ORDER BY Column1 desc, Column2 asc Įxample: SELECT EMP_NAME, EMP_ID FROM EMPLOYEE ORDER BY EMP_NAME desc, EMP_ID asc Ĩ. ORDER BY: It is used to sort the data in a particular order for a particular column in ascending or descending order. Syntax: SELECT COLUMN1, COLUMN2… FROM WHERE IN (‘val1’,’val2’) Įxample: SELECT EMP_NAME, EMP_SALARY FROM EMPLOYEE WHERE EMP_COUNTRY IN (‘INDIA’,‘USA’, ‘NZ’) ħ. IN: This operator helps in filtering the data based on a value match. Syntax: SELECT FROM WHERE TRUE OR FALSEĮxample: SELECT * FROM EMPLOYEE WHERE EMP_COUNTRY=”INDIA” OR EMP_COUNTRY =”USA” Ħ. OR: This MySQL Query Command combines the data from the table for the specific condition. Syntax: SELECT FROM WHERE AND Įxample: SELECT EMP_NAME, FROM EMPLOYEE WHERE EMP_ID=200 AND EMP_COUNTRY=”INDIA” ĥ. AND: This condition is used to filter the data on the basis of conditions. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |