Comments
Matt McLarty wrote: For more info... Follow me on Twitter See our website
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
SQL Tables with All Datatypes
Create table ddls for various databases (Oracle, Teradata and adding more..)

This is a very common task that most application/database developers come across;  testing various datatypes of a database. Honoring the principle DRY, here is a template with  ddl for table creation (covering most data types) across various databases.

Oracle:

CREATE TABLE all_types(c_smallint         SMALLINT,

c_integer            INTEGER,

c_real           REAL,

c_double         DOUBLE PRECISION,

c_bigdecimal     DECIMAL(13,0),

c_varchar2         VARCHAR2(254),

c_nvarchar2         NVARCHAR2(254),

c_varchar        VARCHAR(254),

c_char        CHAR(254),

c_nchar        NCHAR(254),

c_number       number(3,2),

c_long          LONG,

c_raw           RAW(2000),

c_interval_y_m INTERVAL YEAR (3) TO MONTH,

c_interval_d_s INTERVAL DAY (3) TO SECOND,

c_date       DATE,

c_clob            CLOB,

c_blob            BLOB,

c_bfile           BFILE)

 

CTAS: Example of Create Table As in Oracle

create table all_types1 as select * from all_types where 1=1; (use 1=1 to create table with data and 1=0 to create table without data)


Teradata:

CREATE TABLE MYDB.all_datatypes

(

date_ DATE FORMAT 'YY/MM/DD',

byte_ BYTE(30),

VARBYTE_ VARBYTE(30),

char_ CHAR(30),

varchar_ VARCHAR(30) ,

long_varchar_ LONG VARCHAR ,

a3 VARCHAR(30) ,

byteint_ BYTEINT,

decimal_ DECIMAL(5,2),

float_ FLOAT,

integer_ INTEGER,

smallint_ SMALLINT,

interval_y_m INTERVAL YEAR(2) TO MONTH,

interval_y INTERVAL YEAR(3),

interval_m INTERVAL MONTH(2),

blob_ BLOB(2048),

numeric_ DECIMAL(3,2));

CTAS: Example of Create Table As sql command in Teradata

create table mydb.RVSE_all_datatypes5  as ( select * from mydb.all_datatypes2 ) with no data;

Teradata is available for developer/sandbox environments at http://www.teradata.com/t/teradata-express/ both as VM that runs on VMWare Player as well as an Amazon EC2 instance that runs Teradata instance on the Amazon cloud.


About Srinivas Jaini
Srinivas Jaini is a software technologist with extensive experience in developing enterprise software applications.

SOA World Latest Stories
What do the CTOs of the CIA and the U.S. Dept. of Justice and the CIO of the National Reconnaissance Office have in common with the CEOs of Eucalyptus, GoGrid, ActiveState, Appcara, OpSource and Nortonworks, the CTOs of Rackspace, SoftLayer, SOA Software and AppZero, the Founder & Gene...
Many key benefits make the Dell MDC a compelling alternative for your data center solution. In his session at the 10th International Cloud Expo, Steve Cuming, Executive Director of Data Center Solutions at Dell, will take a look at the hyper-efficient, snap-together, flexible choice m...
According to a 2011 survey by the Independent Oracle User Group, over 50% of Oracle’s customers have deployed or are considering deploying private clouds. Most private clouds today support non-production workloads because enterprises are unable to deploy mission-critical applications i...
In this CEO Power Panel at the 10th International Cloud Expo, moderated by Cloud Expo Conference Chair Jeremy Geelan, leading executives in the Cloud Computing and Big Data space will be discussing such topics as: Is it just wishful thinking to depict the Cloud as more than just a te...
In his session at the 10th International Cloud Expo, Marvin Wheeler, Open Data Center Alliance Chairman, will discuss the success the organization has had in charting the requirements for broad-scale enterprise adoption of the cloud and how 2012 is forecast to be the tipping point for ...
Cloud computing is creating the new Wall Street boom, according to NIA. The only industry that is as bright as cloud computing on Wall Street is social networking, NIA said in a recent report. 2012 will be known as the year cloud computing became widely adopted worldwide. Cloud comput...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE