Computer Science, asked by Sandhyasalunke511, 10 months ago

write the significance of maintaining order of attributes while inserting values in table of database

Answers

Answered by 88atharv88
3

Answer:

In order to be able to add and manipulate data, you first have to create a database. There’s not much to this. You’re creating just a container in which you will add tables. Creating a table is more involved and offers many choices. There are several types of tables from which to choose, some with unique features. When creating tables, you must also decide on the structure of each table: the number of columns, the type of data each column may hold, how the tables will be indexed, and several other factors. However, while you’re still learning, you can accept the default setting for most of the options when creating tables.

Answered by rk9506863
0

Important points to remember while   maintaining order of attributes, insert values in table of a  database

Explanation:

Database table maintains information, records and is a storage space to keep the records in a organized way.

Database tables enables the user to add, update, insert row , elements , create , add new category, delete and more functions can be performed.  

1.Insert Data into a database table

Example we need to create a column named "record_No" , and enter the elements or records in it.

For an instance the record is an Primary key ( record_ID).

Roll_No is listed simultaneously

Syntax to Insert elements into the database

INSERT INTO table_name (colum1, colum2, ...)

VALUES (val1, val2, ...);

Whenever you insert the elements into the database. It is important to mention the table name, But not the Column name in SQL query.

It is imp to make the order of the given values is in the same order as the columns in the table.

Example

INSERT INTO Students (Name,  Age, City, Rollno , Country)

VALUES ('Harry', '23', 'Mumbai', '406', 'India');

2.Update Data in the Database

  • It is important to be cautious while updating the record.
  • Once the data updated , old data cant be restored.
  • Where clause signifies , which of the records are to be updated.
  • Never omit the where clause , or else all records will be updated.

Syntax Update

UPDATE table_name

SET colum1 = val1, colum2 = val2, ...

WHERE condition;

Example

UPDATE Client_record

SET ClientName = 'harry', City= 'Mumbai'

WHERE ClientID = 7;

Here this query updates the ClientId no 7 , as mentioned in the where clause.

Similar questions