FRESHERSHOME
Freshers Forum

Can we create the table with more than 2 Long datatype fields in MYSQL ?

This is a discussion on Can we create the table with more than 2 Long datatype fields in MYSQL ? within the MySQL forums, part of the Data Base Related category; The above condition is the must. I want to create table with more than one LONG datatype and declare the ...


Go Back   Jobs in India Forum > Programming > Data Base Related > MySQL

Notices

MySQL MySQL Related discussion, MySQL configuration help, and everything related to MySQL

 
Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2008, 04:03 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 2
Default Can we create the table with more than 2 Long datatype fields in MYSQL ?

The above condition is the must. I want to create table with more than one LONG datatype and declare the two LONG fields as a Primary Key also. (Option is we create the table in PL/SQL or MYSQL with ORACLE10g features are also used). how can i create the table & primary key ?
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 01-13-2008, 04:03 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 2
Default

MySQL doesn't have a LONG datatype. It has a LONGTEXT data type and a LONGBLOB data type, either of which would correspond to a LONG in PL/SQL.

Assuming, therefore, you want to create a table that has three columns: two LONGTEXT columns which will be combined to a single primary key, and a third INT column with a length of 11:

CREATE TABLE mytable
column1 LONGTEXT,
column2 LONGTEXT,
column3 INT(11)
PRIMARY KEY (column1, column2) ;
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-13-2008, 04:38 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 1
Default

two long fields isnt your problem, u cant have two primary keys for one table

make one primary and index the other for searching
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
create, table, than, long, datatype, fields, mysql

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin

Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator

Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details


All times are GMT +6.5. The time now is 03:08 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
FreshersHome.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62