SQL database table
SQL database table
3. Insert Query:-
The SQL INSERT INTO Statement is used to add new rows of data to a table in the
database.
4. Alter in SQL:-
The ALTER TABLE statement in Structured Query Language allows you to add,
modify, and delete columns of an existing table. This statement also allows database
users to add and remove various SQL constraints on the existing tables.
Any user can also change the name of the table using this statement.
The SQL commands (UPDATE and DELETE) are used to modify the data that is
already in the database. The SQL DELETE command uses a WHERE clause.
SQL UPDATE statement is used to change the data of the records held by tables.
Which rows is to be update, it is decided by a condition. To specify condition, we use
WHERE clause.
The DELETE statement is used to delete rows from a table. If you want to remove a
specific row from a table you should use WHERE condition.
7. Order by Clause:-
The SQL ORDER BY clause is used to sort the data in ascending or descending
order, based on one or more columns. Some databases sort the query results in
an ascending order by default.
Ascending Order:-
Descending Order:-
8. Having Clause in SQL:-
This SQL clause is implemented after the 'GROUP BY' clause in the 'SELECT'
statement.
This clause is used in SQL because we cannot use the WHERE clause with the SQL
aggregate functions. Both WHERE and HAVING clauses are used for filtering the
records in SQL queries.