Author: Awais Farooq

  • COPY TABLE

    If you want to copy the data of one SQL table into another SQL table in the same SQL server, then it is possible by using the SELECT INTO statement in SQL. The SELECT INTO statement in Structured Query Language copies the content from one existing table into the new table. SQL creates the new…

  • TRUNCATE TABLE

    A truncate SQL statement is used to remove all rows (complete data) from a table. It is similar to the DELETE statement with no WHERE clause. TRUNCATE TABLE Vs DELETE TABLE Truncate table is faster and uses lesser resources than DELETE TABLE command. TRUNCATE TABLE Vs DROP TABLE Drop table command can also be used…

  • RENAME TABLE

    In some situations, database administrators and users want to change the name of the table in the SQL database because they want to give a more relevant name to the table. Any database user can easily change the name by using the RENAME TABLE and ALTER TABLE statement in Structured Query Language. The RENAME TABLE…

  • DELETE TABLE

    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. But if you do not specify the WHERE condition it will remove all the rows from the table. There are some more terms similar to DELETE statement like…

  • DROP TABLE

    A SQL DROP TABLE statement is used to delete a table definition and all data from a table. This is very important to know that once a table is deleted all the information available in the table is lost forever, so we have to be very careful when using this command. Let’s see the syntax…

  • CREATE TABLE

    SQL CREATE TABLE statement is used to create table in a database. If you want to create a table, you should name the table and define its column and each column’s data type. Let’s see the simple syntax to create the table. The data type of the columns may vary from one database to another.…

  • Table

    Table is a collection of data, organized in terms of rows and columns. In DBMS term, table is known as relation and row as tuple. Note: A table has a specified number of columns, but can have any number of rows. Table is the simple form of data storage. A table is also considered as…

  • SELECT Database

    Suppose database users and administrators want to perform some operations on tables, views, and indexes on the specific existing database in SQL. Firstly, they have to select the database on which they want to run the database queries. Any database user and administrator can easily select the particular database from the current database server using…

  • RENAME Database

    In some situations, database users and administrators want to change the name of the database for some technical reasons. So, the Rename Database statement in SQL is used to change the name of the existing database. Sometimes, the Rename Database statement is used because the developers think that the original name is not more relevant to the…

  • DROP Database

    The SQL Drop Database statement deletes the existing database permanently from the database system. This statement deletes all the views and tables if stored in the database, so be careful while using this query in SQL. Following are the most important points which are required to learn before removing the database from the database system:…