Jump to content

Query to create a table of customer information


alisha0512

Recommended Posts

Hi,Anybody Please tell me the query to prepare a table of customer information.Fields in the table are :Customer name , id, account no, address, phone no., city, salary, department, designation. please help me.
There's an example. Remember to put in YOUR field names into it and keep these rules: 1) no spaces in FieldNames 2) double minus creates a comment from any text that follows it. You need to copy the example to a sql server's query window and remove double minuses from command rows.--Example of how to create a table : CREATE TABLE table_name(column_name1 data_type,column_name2 data_type, ...)How to do:--create Table Cust_info( Country nvarchar(20), DOB DateTime, Name nvarchar(10));Altering a table:-- If you are not happy and want to change a field (Column) first add your new field having a different name, -- then drop the old field. --(A table must have at least 1 field)-- eg.--alter table Contacts drop column Country --alter table Contacts Add Country varchar(20)-- ==========================================================
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...