Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-12-22 : 07:51:48
|
| Ashish Amodia writes "how to create tables in ms-sql?how different opration can be perform in database table, like insert, update, delete with tables.how to create store procedure?" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
activecrypt
Posting Yak Master
165 Posts |
Posted - 2005-12-23 : 06:17:34
|
| Hi,BOL Says :CREATE TABLE employee ( emp_id empid CONSTRAINT PK_emp_id PRIMARY KEY NONCLUSTERED CONSTRAINT CK_emp_id CHECK (emp_id LIKE '[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]' or emp_id LIKE '[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]'), /* Each employee ID consists of three characters that represent the employee's initials, followed by a five digit number ranging from 10000 through 99999 and then the employee's gender (M or F). A (hyphen) - is acceptable for the middle initial. */ fname varchar(20) NOT NULL, minit char(1) NULL, lname varchar(30) NOT NULL, job_id smallint NOT NULL DEFAULT 1 /* Entry job_id for new hires. */ REFERENCES jobs(job_id), job_lvl tinyint DEFAULT 10, /* Entry job_lvl for new hires. */ pub_id char(4) NOT NULL DEFAULT ('9952') REFERENCES publishers(pub_id), /* By default, the Parent Company Publisher is the company to whom each employee reports. */ hire_date datetime NOT NULL DEFAULT (getdate()) /* By default, the current system date is entered. */)And refer links suggested by Mr. Madhivanan:-)RegardsAndy DavisActivecrypt Team--------------------------------------------SQL Server Encryption Softwarehttp://www.activecrypt.com |
 |
|
|
|
|
|
|
|