Programming Blog

Wednesday, January 6, 2010

Creating table in a database with primary key

Syntax:
create table table_name(column_name datatype(size) PRIMARY KEY,column_name1 datatype(size),..n);

Example:
create table sem(sem_id int PRIMARY KEY,sem_name char(30));
Posted by Lokeshwaran at 8:14 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: SQL

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Tweet

Tweet

Like Me

Labels

  • C-Program (8)
  • C++ (4)
  • C++ OOPS' (2)
  • Error (4)
  • java (4)
  • My Presentation (2)
  • OOPS' (4)
  • python (3)
  • SQL (11)
  • ubuntu (8)
  • VB .Net (2)
  • web development (1)

Archives

  • ►  2011 (12)
    • ►  August (2)
    • ►  February (2)
    • ►  January (8)
  • ▼  2010 (30)
    • ►  December (6)
    • ►  September (10)
    • ►  March (1)
    • ▼  January (13)
      • Imports System.Data.SqlClient-NameSpace Error
      • Removing Reference in VB .Net
      • Employability Skills For Students Of 'IT'
      • Droping(Deleting) a database from a SQL Server
      • SQL Server Datatypes
      • Altering column in a table
      • Selecting (display) data from a table
      • Describing an entire table
      • Inserting data into a table
      • Creating table in a database by refercencing foreg...
      • Creating table in a database with primary key
      • Creating table in a database
      • Creating a database in SQL Server
  • ►  2009 (2)
    • ►  December (1)
    • ►  June (1)
Spread the power of open source. Theme images by Lokeshwaran. Powered by Blogger.