473,387 Members | 1,318 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

CREATE TABLE and CONSTRAINTS

hirak1984
316 100+
well very new to sql,as I am...
I am posting this query,please explain me what it is,

Expand|Select|Wrap|Line Numbers
  1.   CREATE TABLE [dbo].[DOORD_ORDER] (
  2.  [ORDER_NBR] [int] NOT NULL ,
  3.  [TOTAL_SEQ_NBR] [int] NOT NULL ,
  4.  [DELIVERY_IND] [char] (1) NOT NULL ,
  5.  [CONTACT_LST_NME] [varchar] (30) NOT NULL ,
  6.  [CONTACT_FRST_NME] [varchar] (40) NOT NULL ,
  7.  [CONTACT_TYP] [varchar] (30) NOT NULL ,
  8.  [CONTACT_TXT] [varchar] (100) NOT NULL ,
  9.  [OR_CDE] [char] (1) NOT NULL ,
  10.  [DROPOFF_DTE] [datetime] NOT NULL ,
  11.  [PICKUP_DTE] [datetime] NOT NULL ,
  12.  [LST_OPR_ID] [char] (8) NOT NULL ,
  13.  [LST_MNT_TSMP] [datetime] NOT NULL ,
  14.  [WAIT_INSTORE_IND] [char] (1) NOT NULL 
  15. ) ON [PRIMARY]
  16. GO
  17. ALTER TABLE [dbo].[DOORD_ORDER] WITH NOCHECK ADD 
  18.  CONSTRAINT [PK_DOORD] PRIMARY KEY  CLUSTERED 
  19.  (
  20.   [ORDER_NBR]
  21.  ) WITH  FILLFACTOR = 90  ON [PRIMARY] 
  22. GO
  23.  
Feb 23 '07 #1
4 2500
MMcCarthy
14,534 Expert Mod 8TB
Hirak

This query creates a new table called [dbo].[DOORD_ORDER] and then adds a constraint to the table in this case designates the primary key [ORDER_NBR].

Mary
Feb 24 '07 #2
hirak1984
316 100+
well mary,is this oracle?

we didnt do like this in oracle,right?
please tell me what type of db query is this
hirak
Hirak

This query creates a new table called [dbo].[DOORD_ORDER] and then adds a constraint to the table in this case designates the primary key [ORDER_NBR].

Mary
Feb 24 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
well mary,is this oracle?

we didnt do like this in oracle,right?
please tell me what type of db query is this
hirak
Actually it does look like Oracle to me. It's been a while since I've used it though so I could be wrong. It could also be SQL Server. Sorry Hirak I haven't used either in a few years and they all just blend together now.

Mary
Feb 24 '07 #4
hirak1984
316 100+
you need not be sorry mary because you are right.

this is a sqlserver query I found out now.
I am sorry to post it in oracle forum,because then I didnt have an idea,what it was.
I dont have necessary privileges,please transfer it to the sqlserver forum
Actually it does look like Oracle to me. It's been a while since I've used it though so I could be wrong. It could also be SQL Server. Sorry Hirak I haven't used either in a few years and they all just blend together now.

Mary
Feb 26 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Phil Powell | last post by:
create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not...
1
by: js | last post by:
I am trying to create a primary key constraint on a view in the following statement. However, I got an error ORA-00907: missing right parenthesis. If the CONSTRAINT clause is removed, then the...
1
by: danths | last post by:
Hello, I am being sent a fmt file and a data file without headers which I would like to import into my sql 2000 server. However the data files have couple of 100's of columns, how could I avoid...
3
by: teedilo | last post by:
Our MS SQL (SQL Server 2000) DBA has database privileges locked down pretty tightly. We end users/developers do not have administrator privileges for most databases. That arrangement has worked...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
4
by: Priya | last post by:
Hey all, Is there a way to create a table in the SQL database by using an XML file as an input? I want to have an XML file which holds all the details of the table like the tablename, columns,...
2
by: Jeff Kish | last post by:
Hi. I have a procedure with this in it (there are no other references to asset_number_bak_tmp_pk in the procedure and it calls nothing else written by me, just system calls or normal dml). ...
5
by: yeoj13 | last post by:
Hello, I have a db2load script I'm using to populate a large table. Ideally, my target table is required to have "Not Null" constraints on a number of different columns. I've noticed a ...
3
by: Rahul B | last post by:
Hi, I have a user UCLDEV1 which is a part of staff and a group(db2schemagrp1) to which i have not given any permissions. The authorizations of that user are shown as db2 =get authorizations...
2
by: jarea | last post by:
I have read quite a bit about this error but I have yet to find the solution to my problem. I am trying to execute the following mysql statement: alter table line_items add...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.