Monday, 8 November 2021

DBMS_SHORT

DBMS

DBMS /SQL Interview Questions

Structer Query language is a computer language for Management of database and data manipluation . SQL is used to query ,insert,update and modify datain a database.
it contains a lot of component which a user can execute to perform operation on a database.

component of sql /database language is:-
1.DDL
2.DML
3.DCL
4.DQL

create statement is used to created database schema and to define the type and structer of the data to be strored in the database.
Create statement can be used for:-
Creating a Database
Creating a Table

drop query Truncate query
Drop Table does delete complete table but it delete table structure too. Truncate Table doesn't delete the structer of the table.

Alter is used to modify the structer of the rxisting table. it is used to add,delete,modify,or rename column in the existing table. It is used to add and drop various constrains on an existing table.

Alter table -Add column = for adding new column in a table.
Alter table -Drop column = for removing existing column in table.
Alter table -Modify column = To Modify existing column in a table.
Alter table -Rename column = To rename an existing column in a table.

Drop-table statement completely removes a table from the database. this command will destroy the table structer and the data stroedin it.
Drop Table table-name.

Truncate statement is used to remove all rows (complete data) from a table .it is similar to the delete statement with no WHERE clause.
Syntax:-
Truncate table table_name;

No comments:

Post a Comment

How do you select data from a table in SQL?

Create Table How do you select data a table in SQL? The SELECT statement is used to se...