Skip to main content

Create Table in SQL

Create table in SQL: How to create table in SQL

In this post , i'm going to explain that how you can create table in SQL easily:

To create table in SQL, you can use CREATE Table command:

Syntax for Create table:

CREATE TABLE Table_Name( Column _Name1 Datatype, Column_Name2 Datatype.....etc);

In above, to create table, First you need to define the action about what you are going to create so i have define command CREATE TABLE, this command will always be used if you are going to create Table.
Then you need to give Table Name because every table must have their unique name.

Then create column name like First_Name, Lasr_Name, Age whatever you required then every column must have their datatype define so that SQL can identify what type of values will be passed.

Now look at below example:
In this we are going to create a table for employee record like EMP table haveEmp_ID, Emp_Name, Emp_Age, DOJ and Salary.

CREATE TABLE EMP

(Emp_ID INT, 
 Emp_Name Varchar(20),
 Emp_Age INT, 
 Emp_Salary INT);

Result will be :

Emp_ID
Emp_Name
Emp_Age
Emp_Salay


This is the way by which you can create SQL Table. To Insert Value in this table, please refer Insert Values post in next post.




Popular posts from this blog

Software Testing Interview Question for beginners and experienced

 Software Testing Interview Question for beginners and experienced Software Testing Interview Question for beginners and experienced- software testing interview questions INTERVIEW QUESTIONS Project specific Questions 1. What was the duration of your project? 2. Explain about your project. 3. How many testers were their on this project. 4. According to you which was the complex part of the project from testing point of view. 5. How did you do the testing of your project? 6. How many test cases have you designed? How many you wrote in a day? 7. How many bugs did you find? 8. Tell me any high Severity bugs that you found. 9. What happens when the client changes requirements? 10. Which tool you used for defect reporting? 11. What is the database used for your project. 12. In which technology this application is developed? Company specific Questions 1. Where are you working currently? 2. How that Seed has sent you here for an interview when you are working in the same company. 3. Where...

How to analyze a JMeter summary report?

  A  Jmeter  Test Plan must have listener to showcase the result of performance test execution. Listeners capture the response coming back from Server while Jmeter runs and showcase in the form of – tree, tables, graphs and log files. It also allows you to save the result in a file for future reference. There are many types of listeners Jmeter provides. Some of them are: Summary Report, Aggregate Report, Aggregate Graph, View Results Tree, View Results in Table etc. Here is the detailed understanding of each parameter in Summary report. By referring to the figure: Label : It is the name/URL for the specific HTTP(s) Request. If you have selected “Include group name in label?” option then the name of the Thread Group is applied as the prefix to each label. Samples : This indicates the number of virtual users per request. Average : It is the average time taken by all the samples to execute specific label. In our case, the average time for Label 1 is 942 milliseconds & to...

What is SQL

SQL Introduction:What is SQL SQL stands for Structure Query Language. SQL is used to create database and manipulate database. Almost every industries have their own database which is used on daily basis to maintain record of the inventory, Employee record, salary record etc. So Database is very important for all industries whether it is small industries or big industries. Without database , it is very difficult to maintain record so database is required at all place. SQL is a structure query language that enables you to work with a database. Using SQL, you can insert records, update records, and delete records. You can also create new database objects such as databases and tables. And you can drop (delete) them SQL is of two type which is frequently used in an application to save record 1. DDL(Data Definition Language) 2. DML(Data Manipulation language) Data:   Data is a fact which is related to any object For example your name, age, height, weight, etc are some data...