Showing posts with label duplicates. Show all posts
Showing posts with label duplicates. Show all posts

Thursday, March 29, 2012

create table statement

I need to create duplicates of certain tables.
It woud be great if i can find the 'create table statement', in any of
the system tables which the Create Table of the Object Browser in
Query Analyzer users, so that i can just change the name and create a
new table thus.
Please help me find the Create Table statement available in the system
tables
thank you
Right click on the table in SSMS object browser, select Script Table As ->
CREATE to -> New Query Window
Anith
|||Unfortunately, the ddl is not stored in the system tables. You can script
the tables from EM or SSMS though.
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
<thetaamommy@.gmail.com> wrote in message
news:1c72f9e7-1052-40c3-8a2d-0f72a4e4c5bf@.c33g2000hsd.googlegroups.com...
>I need to create duplicates of certain tables.
> It woud be great if i can find the 'create table statement', in any of
> the system tables which the Create Table of the Object Browser in
> Query Analyzer users, so that i can just change the name and create a
> new table thus.
> Please help me find the Create Table statement available in the system
> tables
> thank you
sql

create table statement

I need to create duplicates of certain tables.
It woud be great if i can find the 'create table statement', in any of
the system tables which the Create Table of the Object Browser in
Query Analyzer users, so that i can just change the name and create a
new table thus.
Please help me find the Create Table statement available in the system
tables
thank youRight click on the table in SSMS object browser, select Script Table As ->
CREATE to -> New Query Window
--
Anith|||Unfortunately, the ddl is not stored in the system tables. You can script
the tables from EM or SSMS though.
--
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
<thetaamommy@.gmail.com> wrote in message
news:1c72f9e7-1052-40c3-8a2d-0f72a4e4c5bf@.c33g2000hsd.googlegroups.com...
>I need to create duplicates of certain tables.
> It woud be great if i can find the 'create table statement', in any of
> the system tables which the Create Table of the Object Browser in
> Query Analyzer users, so that i can just change the name and create a
> new table thus.
> Please help me find the Create Table statement available in the system
> tables
> thank you|||Yes it's like he says
And you can do this also in your Query Analyaer (Right Click on your table I
mean) ;)
Arjen
"Anith Sen" <anith@.bizdatasolutions.com> schreef in bericht
news:u9MPgoUfIHA.4712@.TK2MSFTNGP04.phx.gbl...
> Right click on the table in SSMS object browser, select Script Table As ->
> CREATE to -> New Query Window
> --
> Anith
>

Sunday, March 11, 2012

Create Primary Key with increment and format?

I have an access table that has a primary key (entitled "ID Number"), no duplicates, the field is an integer.
And, importantly, the value is set to "increment".
The format is "phd"000 - so it starts outphd001,phd002, and so on...
How to do this in an SQL table? Can that format be done? Or is it better not to do it via SQL but in coding instead?In SQL Server you do Unique constraint or Unique index for no duplicates the former allow nulls the later not null being primary key and set IDENTITY property on the column for auto increament. Run a search for Unique constraint and Unique index and the IDENTITY property in SQL Server BOL(books online). Hope this helps.